slate
-
Posts
4 -
Joined
-
Last visited
Never
Posts posted by slate
-
-
Figured it out myself...
There\'s a bug in mysql (according to mysql.com) so I have to do this:
$valsToInsert = \"\";
if ($point_id != \"\")
{
$valsToInsert = $valsToInsert . \"\'$point_id\'\";
}
else
{
$valsToInsert = $valsToInsert . \"NULL\";
}
for each $string i need to check it.
-
CREATE DATABASE your_db;
CREATE TABLE `yourtable` ( `code` INT(9) NOT NULL AUTO_INCREMENT, `parentcode` INT(9) NULL , `title` VARCHAR(30) NULL , `description` VARCHAR(30) NULL , `uname` VARCHAR(30) NULL , `email` VARCHAR(30) NULL , UNIQUE ( `code` ) );
-
In this piece of a line of code:
$result = sql_query(\"INSERT INTO map_points VALUES (\'$point_id\', \'$point_title\', \'$point_desc\', etc...
it $point_title is empty (null) in the form, and the default value is NULL, why is it being inserted as 0 into the database?
n00b question
in MySQL Help
Posted
Show me lines 10-25 of forum.php please