Jump to content

multiple table pull, MySQL


monkeymade

Recommended Posts

$result = mysql_query("SELECT $tb1.fname FROM $tb1, $tb4 WHERE $tb1.email = '$T1' AND $tb1.pass = '$T2' AND $tb1.unum=$tb4.unum",$db) or die(mysql_error());
		$_SESSION['myfname'] = mysql_result($result,0,"$fname");

 

The error I get is:

 

Warning: mysql_result() [function.mysql-result]: not found in MySQL result index 6 in /home/xratedda/public_html/loginout.php on line 39

 

I know, it looks like I am only grabbing one thing and don't need different tables, but I am trying to figure out how to do this with just one item, before adding the rest.

 

Someone please help me out here

Link to comment
https://forums.phpfreaks.com/topic/48866-multiple-table-pull-mysql/
Share on other sites

Your variables is confusing. ???

 

You do this:

SELECT $tbl.fname ....

 

and you retrieve this:

mysql_result($result,0,"$fname");

 

?? You have a variable name $fname = "fname"; ?

 

and the variables $tbl, $tb4 is assigned to your table name?

 

Check all your variables. Selecting multiple table will sometimes slow down the process. Try use 2 query. Much faster.

 

Hope this help you

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.