Hello! I have the following code that creates a table structure. How do I give Age a default value of 0
mysql_select_db("DB", $connection); $sql = "CREATE TABLE Person ( Name text, Age text, Sex text )";
mysql_select_db("DB", $connection); $sql = "CREATE TABLE Person ( Name text, Age text default '99', Sex text )";
i would make age an int
Thank for that. I will later, it's text just for testing purposes!
"Testing" purposes? What good is testing a setup that won't be similar to the one used in production?
Anyway, don't forget to mark this thread resolved.