ManicMax Posted April 19, 2008 Share Posted April 19, 2008 Here is the mysql query and it is running I have an or die on the end and it doesnt die. is something in my syntax wrong??? UPDATE calendar SET am700='1' AND am730='1' WHERE date='14/04/08' Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/ Share on other sites More sharing options...
ohdang888 Posted April 19, 2008 Share Posted April 19, 2008 mysql query("UPDATE calendar SET am700='1' AND am730='1' WHERE date='14/04/08' ") or die(mysql_error); i know that sounds stuupid, but is your syntax in the mysql query? Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521275 Share on other sites More sharing options...
ManicMax Posted April 19, 2008 Author Share Posted April 19, 2008 yes, im also running it directly in phpmyadmin and it says 0 rows affected ran in 0.022 seconds Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521292 Share on other sites More sharing options...
Fadion Posted April 19, 2008 Share Posted April 19, 2008 If your `date` mysql column is varchar then check if that date exists, but if your columns is of type 'date' then the format is YYYY-MM-DD. Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521307 Share on other sites More sharing options...
chigley Posted April 19, 2008 Share Posted April 19, 2008 What field type is date? Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521314 Share on other sites More sharing options...
Fadion Posted April 19, 2008 Share Posted April 19, 2008 What field type is date? If the question was for me: Mysql Data Types, like "date" or "time"!!! See the manual If not sorry Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521322 Share on other sites More sharing options...
chigley Posted April 19, 2008 Share Posted April 19, 2008 What field type is date? If the question was for me: Mysql Data Types, like "date" or "time"!!! See the manual If not sorry. Nah it was aimed at the OP Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521324 Share on other sites More sharing options...
ManicMax Posted April 19, 2008 Author Share Posted April 19, 2008 it is only letting me update one field at a time. Date field is varchar. the query will only work if i update one field at a time Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521350 Share on other sites More sharing options...
chigley Posted April 19, 2008 Share Posted April 19, 2008 UPDATE calendar SET am700='1', am730='1' WHERE date='14/04/08' Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521351 Share on other sites More sharing options...
ManicMax Posted April 19, 2008 Author Share Posted April 19, 2008 Your a start chigley you really are!! Thats two problems solved by you today ok make it three how do I change the subject title and image of this post to be solved? Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521353 Share on other sites More sharing options...
chigley Posted April 19, 2008 Share Posted April 19, 2008 Just below the bottom post, and a bit to the left is a "Topic Solved" button Link to comment https://forums.phpfreaks.com/topic/101853-solved-mysql-query-running-but-not-working/#findComment-521354 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.