Re: oddity with insert multiple input fields - olved

From: Date: Mon, 19 Aug 2002 04:22:10 +0000
Subject: Re: oddity with insert multiple input fields - olved
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-21226@lists.php.net to get a copy of this message
On Sun, 2002-08-18 at 01:20, Joni Järvinen wrote: > > if (!isnull($date_am || $exercise_am || $reps_am)) then > > mysql_query($sql_am) or die > > ("Error in this query >>$sql<< : " .mysql_error()); > > Try: > > if(!isnull($date_am) && !isnull($exercise_am) && !isnull($reps_am)) > > This should IMO work :) > > -Joni- Got it working like this - $sql_am = "insert into absmachine (today,exercise,reps,comments) values ('$date_am','$exercise_am','$reps_am','$comments_am')"; if(!empty($date_am) && !empty($exercise_am) && !empty($reps_am) mysql_query($sql_am) or die ("Error in this query >>$sql<< : " .mysql_error()); Thanks to everyone for pointing me in the right direction. -- Chip

« previous php.db (#21226) next »