![]() |
SQL (multiple) query error
Any of the programmer types on here able to tell me why this is kicking out the following error?
Quote:
Here was the original code: Quote:
Quote:
|
Oh, i should add, when using only 1 query, the code works perfectly :)
|
Is this all of the code? What are lines 62, 63 and 74?
|
Quote:
|
Not sure how any of that code is running.
You mention 2 queries but you only have one query in there. It has 2 conditions, but it is one query. Quote:
$sql = "SELECT * FROM Recipe WHERE Title RLIKE 'fryer' AND Title RLIKE 'Air' ORDER BY Title ASC"; You have to have the field being interrogated listed in each condition. I am not sure if that is your only problem. Quote:
The second set of code that was posted should not even run because of the errors in there. It shows 2 different wile loops but only one is closed. That doesn't matter though because the 2 different while loops make no sense. You are looping through the resuult and inside the loop you are looping through the results again. I don't think you want ot do that. . |
Try replacing the line
Quote:
Quote:
http://www.quickmeme.com/img/fb/fbdf...a8e23a6bd6.jpg |
BTW the parameters need to be in the order ("localhost", user, password, database_name)
But you said it works fine if you only have one query so it may be you had the correct code for connecting to the database. Try using the query Sarettah described, the ones you wrote don't make sense. |
i fixed it early this morning.
This issue was a missing Category as Sarettah mentioned above. Quote:
Must stop coding while drinking Jameson, that will solve most of the issues :1orglaugh |
All times are GMT -7. The time now is 05:10 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc