Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Right Join Problem

    What I'm trying to do is get the information from the $a column from the users and then go to the gear column and search the Name column for whatever was is $a.

    PHP Code:
    $sql3 "SELECT * FROM gear RIGHT JOIN users gear.Name=users.$a WHERE Username ='$_SESSION[Username]'" or die(mysqli_error($con));
    $cross mysqli_query($con$sql3);
    $gear mysqli_fetch_assoc($cross); 
    but I get

    Code:
    Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    The OR DIE is on the wrong line
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •