Jump to content

Error?


eduard

Recommended Posts

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'?

  • Like 1
Link to comment
Share on other sites

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

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

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 said
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'?

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...