monkeymade Posted April 27, 2007 Share Posted April 27, 2007 $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 More sharing options...
xenophobia Posted April 27, 2007 Share Posted April 27, 2007 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 Link to comment https://forums.phpfreaks.com/topic/48866-multiple-table-pull-mysql/#findComment-239516 Share on other sites More sharing options...
monkeymade Posted April 27, 2007 Author Share Posted April 27, 2007 well, don't I feel stupid.... $_SESSION['myfname'] = mysql_result($result,0,"$fname"); should have been: $_SESSION['myfname'] = mysql_result($result,0,"fname"); Thanks for pointing that out lol Link to comment https://forums.phpfreaks.com/topic/48866-multiple-table-pull-mysql/#findComment-239544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.