cyber_alchemist Posted October 18, 2013 Share Posted October 18, 2013 I am bit new to sql so is this correct for updating these fields and its values ? UPDATE tourDB SET tour_name = '$tour_name', tour_type = '$tour_type', nights = '$nights', overview = '$overview', itinerary = '$itinerary', inclusions = '$exclusions', twin_triple_sharing = '$single_occcupancy', child_with_no_bed = '$child_with_no_bed', inf_below = '$inf_below,' keywords = '$keywords', title = '$title', description = '$description', url = '$url', categories = '$categories' WHERE tour_id = '$tour_id' I want to update these where tour_id column has a value of $tour_id Link to comment https://forums.phpfreaks.com/topic/283078-is-my-mysql-update-syntax-correct/ Share on other sites More sharing options...
requinix Posted October 18, 2013 Share Posted October 18, 2013 It may sound like a silly question, but does it work and update the fields the way you want it to? Link to comment https://forums.phpfreaks.com/topic/283078-is-my-mysql-update-syntax-correct/#findComment-1454398 Share on other sites More sharing options...
cyber_alchemist Posted October 18, 2013 Author Share Posted October 18, 2013 well, if I replace the php variable's with constants, it works...? but other than that , it not working , maybe i have some problem with my php programme ??? what do suggest , by looking the update query ?? I am stuck for 3 hrs working around this problem Link to comment https://forums.phpfreaks.com/topic/283078-is-my-mysql-update-syntax-correct/#findComment-1454400 Share on other sites More sharing options...
requinix Posted October 18, 2013 Share Posted October 18, 2013 What you posted looks fine (honestly, I would have said something if it didn't) so if there's a problem then it must be with what you haven't posted. So how about showing us the rest of your code? Link to comment https://forums.phpfreaks.com/topic/283078-is-my-mysql-update-syntax-correct/#findComment-1454402 Share on other sites More sharing options...
cyber_alchemist Posted October 18, 2013 Author Share Posted October 18, 2013 yes , sure, I will post in PHP section then ? Link to comment https://forums.phpfreaks.com/topic/283078-is-my-mysql-update-syntax-correct/#findComment-1454403 Share on other sites More sharing options...
cyber_alchemist Posted October 18, 2013 Author Share Posted October 18, 2013 posted it here http://forums.phpfreaks.com/topic/283080-cant-update-my-tables/ Link to comment https://forums.phpfreaks.com/topic/283078-is-my-mysql-update-syntax-correct/#findComment-1454405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.