bluntedbynature Posted June 7, 2005 Share Posted June 7, 2005 ok, i got a database that has a feild called catID and pageID what i want to do is make it so they go to the site and the address looks like this index.php?cat=3&page=1 This is the way i set up the SQL this is what im getting but there is data in the database. Quote Link to comment https://forums.phpfreaks.com/topic/2350-2-where-statements/ Share on other sites More sharing options...
bluntedbynature Posted June 7, 2005 Author Share Posted June 7, 2005 ok i changed it alittle bit, to WHERE site.catID = catID AND site.pageID = pageID and now i get an pop up message saying 1054 Unknown column 'site.1' in 'where clause' what the hell does that mean? Quote Link to comment https://forums.phpfreaks.com/topic/2350-2-where-statements/#findComment-7711 Share on other sites More sharing options...
obsidian Posted June 7, 2005 Share Posted June 7, 2005 well, since you're trying to call the variables the exact same name as the columns in the recordset, you're going to run into issues like that... you've said that siteID = 1 in the assigning of the variable, and then you try to select site.siteID which interprets to site.1 try to name your variables to something completely different that you know what they refer to. also, in your initial values, your default is being set to 1 and 1... make sure that you actually have a recordset with the cat value of 1 AND site value of 1 Quote Link to comment https://forums.phpfreaks.com/topic/2350-2-where-statements/#findComment-7712 Share on other sites More sharing options...
bluntedbynature Posted June 7, 2005 Author Share Posted June 7, 2005 dude your the best. i would have never thought to look at that. thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/2350-2-where-statements/#findComment-7713 Share on other sites More sharing options...
obsidian Posted June 7, 2005 Share Posted June 7, 2005 dude your the best. i would have never thought to look at that. thanks for the help. 240341[/snapback] that's what we're here for! ;-) Quote Link to comment https://forums.phpfreaks.com/topic/2350-2-where-statements/#findComment-7714 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.