Wazzup everybody...
In a php script (the code is listed below) interfacing with a MySQL db, I'm recieving the following error on a line utilizing a while loop to perform a task with each row of data pulled from the db in a select statement.
Any idea why this isn't werking?
This is a cookie-cutter while loop I use all of the time.
The basics:
- I did attempt to use the select statement manually through the db - it DOES work.
- The connection to the db works too
- I am going insane right now...
- the variable $codeis the actual SQL statement submitted via an HTML form to this page
- Yes I used echo statements to verify that this data is successfully being sent over
Thank you all in advance for any help you might provide...
-=Lazzerous=-
The Script:
<?php
mysql_connect("localhost",user,pass);
mysql_select_db('dbName');
$retrieve = "$code";
$workit = mysql_query($retrieve);
while($row=mysql_fetch_array($workit)){
$fixxx = "update outage set custcalled = 'yes' where tss like '$row[0]' and name like '$row[1]' and city like '$row[4]' and datestamp like '$row[32]'";
$xxxif = mysql_query($fixxx);
}
echo "Code: $code<br>\n";
echo "Retrieve: $retrieve<br>\n";
echo "Workit: $workit<br>\n";
echo "Thank you!<br>\n";
echo "All of the entries requested have been updated.<br>\n";
echo "Please close this browser window to return to the Administrative guide site.<br>\n";
?>