Hello, I am re-working some old code, and I am dealing
html page with several forms (generated by a php
script). When one of them is submitted, I update a
MySQL database like so:

$updateQuery = 'UPDATE annou_seminar_seminars SET
show_dev=1, dev_date="'.($date).'",
dev_speaker="'.addslashes($_POST['speaker']).'",
dev_speechTitle="'.addslashes($_POST['title']).'",
dev_info="'.addslashes($_POST['Info']).'" WHERE
id='.$id_list[4];

echo $updateQuery."<br>";
$res=mysql_query($updateQuery);
if( !$res )
{
      echo "error: " . mysql_error();
      echo '<br>'.$updateQuery;
}
else
{
>>>>>>>>>>>>>>>>>then I check what got inputted and 
>>>>>>>>>>>>>>>>>>exit like so:

$seminarQuery = 'SELECT locationID, dev_date,
dev_speaker, speaker, dev_info, dev_speechTitle, id
FROM annou_seminar_seminars WHERE id=52;';
      print "seminarQuery: $seminarQuery<BR>";
      mysql_query( $locationQuery );
                                                      
                                                      
               
      $seminarRes = mysql_query( $seminarQuery );
                                                      
                                                      
               
      $seminar_assc = mysql_fetch_assoc($seminarRes);
      echo "before return dev_speaker was:
".$seminar_assc['dev_speaker']."<br>";
     echo "before return speaker was:
".$seminar_assc['speaker']."<br>";
                                                      
                                                      
               exit;
}

Okay the weird part is that everything seems kosher,
(no errors, the output from the select statement
prints out the data I entered), the only problem being
when I look in the database (via a webadmin or
bringing up the data in another form) it's not there!
In another words I'm looking at the web page when this
exits, and it prints out data, while I'm
simultaneously looking at the webadmin (just
refreshed), and the updated field not only wasn't
updated, any information in the database is now blank.
So it's affecting the row, just not the way I want =P.
Also once I go to the next page, do a select, print it
out, etc. nothing is there. 

BTW. My file is included in another file where the
actual connection is made. The owner of the files
which included mine, has also looked at this problem,
to no avail. I think I'm just going to re-write the
thing, but curiousity demands I try to figure it out.

Thanks!

sTu

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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

Reply via email to