RE: [PHP] confused big time

From: Date: Wed, 07 Apr 2004 00:25:12 +0000
Subject: RE: [PHP] confused big time
Groups: php.general 
Request: Send a blank email to php-general+get-182575@lists.php.net to get a copy of this message
Andy B <mailto:aborka1@wmis.net> on Tuesday, April 06, 2004 5:18 PM said: > um...im not doing selects im doing inserts with variable names... i > understand the idea with select but thats not the deal....its an > insert... i was hoping that wouldn't cause any confusion, but i guess it did. the thing to remember is that a query is a query. you know, parts is parts. here is your first query, written better. <?php $sql = " INSERT INTO $EventsTable VALUES ( NULL , '{$_SESSION['add']['type']}' , '{$_SESSION['add']['start_date']}' , '{$_SESSION['add']['end_date']}' , '{$_SESSION['add']['name']}' , '{$_SESSION['add']['county']}' , '{$_SESSION['add']['discription']}' , '{$_SESSION['add']['StartingDay']}' , '{$_SESSION['add']['StartingMonth']}' , '{$_SESSION['add']['StartingYear']}' , '{$_SESSION['add']['EndingDay']}' , '{$_SESSION['add']['EndingMonth']}' , '{$_SESSION['add']['EndingYear']}'"; ?> hth, chris.

« previous php.general (#182575) next »