I ma struggling to work out a query and if i am honest I don't really understand how when you are using a sql with php you can select variable values for your query.
I kind of understand how but not the exact syntax for the queries to work.
This is my query
$result = mysql_query("SELECT * FROM Cottage, Location WHERE Cottage.Location_ID = '$location' AND Cottage.Location_ID = Location.Location_ID ");
$location is a number and if i try the query and instead of using $location i use a number 1 the query works or number 6 etc.
So I imagine my problems is with how i have escaped my variable in my sql query.
Could someone help me please???
Also tell me how how supply a link to a good resource for how i understand this for both numbers and letters in the future.
Cheers