Arthur Pelkey wrote:
I keep getting Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in lines 17 and 21, they are marked below. I am drawing a blank, starting to doze off also :S, thunderbird has crappy default composition widths(anyone know how to change it?), so the formatting my be awry.


$sun_5a_n1 = "1"; $sun_5a_t1 = "2";

if($sun_5a_n1) {
$result = mysql_query("UPDATE sunday SET a5_n_1='$sun_5a_n1',a5_t_1='$sun_5a_t1'")
while($row = mysql_fetch_array($result)) {
(line 17)echo "Sunday @ 5am slot modified to Name: $sun_5a_n1, Time: $sun_5a_t1<br>";
break;
}
mysql_free_result($result);
(line 21)}



-Art



An update shouldn't return a result set. Use mysql_affected_rows() to see if your query changed anything.


--
***********************************************************************
*  _  __       __      __       _                      * John  Nichel *
* | |/ /___ __ \ \    / /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' </ -_) _` \ \/\/ / _ \ '_| / /(_-<_/ _/ _ \ '  \ * 737 Main St. *
* |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150   *
*          |___/                                       * Buffalo, NY  *
* http://www.KegWorks.com            [EMAIL PROTECTED] * 14203 - 1321 *
***********************************************************************

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to