eduard Posted April 20, 2012 Share Posted April 20, 2012 Is there an error in this example (Update)? <?php$con = mysql_connect("localhost","peter","abc123");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("my_db", $con);mysql_query("UPDATE Persons SET Age=36WHERE FirstName='Peter' AND LastName='Griffin'");mysql_close($con);?> Must it be:'36'? 1 Link to comment Share on other sites More sharing options...
birbal Posted April 21, 2012 Share Posted April 21, 2012 why dont you try runing it? Must it be:'36'?it should not be quoted if the field is integer. Link to comment Share on other sites More sharing options...
eduard Posted April 21, 2012 Author Share Posted April 21, 2012 why dont you try runing it? it should not be quoted if the field is integer. Thanks! (What do you think I´ve been doing!) Link to comment Share on other sites More sharing options...
divinedesigns1 Posted April 21, 2012 Share Posted April 21, 2012 Thanks! (What do you think I´ve been doing!) we are not mind readers, unless you say, i try running this code and its not working,, we have no way of knowing if you run it or not, because pretty much this is what you saidIs there an error in this example (Update)?<?php$con = mysql_connect("localhost","peter","abc123");if (!$con){die('Could not connect: ' . mysql_error());}mysql_select_db("my_db", $con);mysql_query("UPDATE Persons SET Age=36WHERE FirstName='Peter' AND LastName='Griffin'");mysql_close($con);?>Must it be:'36'? now if i was to come to you and say pencil ice nose feet thanks, would you know what the ###### i was saying? no you wouldnt because i just listed a group of random things without using a complete sentence or giving a description of exactly what i want Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now