entering null value to mysql

From: Date: Sat, 07 Oct 2000 14:06:01 +0000
Subject: entering null value to mysql
Groups: php.db 
Request: Send a blank email to php-db+get-3391@lists.php.net to get a copy of this message
Hello I'm having a problem entering null values into mysql from a php script. I'm that the solution has something to do with the addslashes function since null values must be entered into mysql without quotes. So far nothing has worked though. Here is one of my failed attempts: $goal_1 = addslashes($goal_1); $goal_2 = addslashes($goal_2); $goal_3 = addslashes($goal_3); $goal_3 = addslashes($goal_4); $wu = addslashes($wu); $sql = " insert $table_name (id_number,name,date,goal_1,goal_2,goal_3,goal_4,wu) values('$id_number','$name','$date','$goal_1','$goal_2','$goal_3', 'goal_4','$wu') "; Any help would be appreciated. Thanks, Scott Wagner

« previous php.db (#3391) next »