Welcome Guest, Not a member yet? Register   Sign In
A query in multiple tables
#4

[eluser]earlyriser[/eluser]
Thanks for the help Sumon, but I could not be able to make it right.
I copy/pasted the code and I get a PHP error and a DB error.

The PHP error is "Message: Undefined variable: logged_in_user_id"

The DB error is
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
select w.name, c.rating from wines w, wine_comments c where w.id=c.wine_id AND c.user_id =


Then I changed your $SqlInfo line for
Code:
$SqlInfo="select w.name, c.rating from wines w, wine_comments c where w.id=c.wine_id AND  c.user_id = getUserProperty('id')";
because I am using FreakAuth and that is its way to get the user id and then I gont only the DB error.

Any hints?


Messages In This Thread
A query in multiple tables - by El Forum - 10-01-2008, 02:33 PM
A query in multiple tables - by El Forum - 10-01-2008, 04:33 PM
A query in multiple tables - by El Forum - 10-01-2008, 05:17 PM
A query in multiple tables - by El Forum - 10-01-2008, 05:38 PM
A query in multiple tables - by El Forum - 10-01-2008, 05:52 PM
A query in multiple tables - by El Forum - 10-01-2008, 08:42 PM
A query in multiple tables - by El Forum - 10-01-2008, 08:58 PM
A query in multiple tables - by El Forum - 10-01-2008, 09:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB