Re: MYSQL insert problems

From: Date: Fri, 17 Oct 2008 16:49:11 +0000
Subject: Re: MYSQL insert problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-282047@lists.php.net to get a copy of this message
Just incase the problem was refrencing an array in an SQL statement I tried this too with the same result. <?php session_start(); $connection = mysql_connect('localhost','FrankS','rastane'); mysql_select_db('envelope1',$connection); $filtered = $_SESSION['filtered']; $salesorder = $filtered['SalesOrder']; $user = 1; $date = date('m/d/Y', time()); $shipdate = $filtered['ShipDate']; $quantity = $_SESSION['quantity']; $cases = $_SESSION['cases']; $pallets = $filtered['FullPallets']; $weight = $filtered['Weight']; $shippedby = $filtered['ShippedBy']; $billoflading = $filtered['BillofLading']; mysql_query("INSERT INTO shipped (FKOESalesOrder, FKUSUsers, DateEntered, DateShipped, Quantity, Cases, Pallets, Weight, FKUSShippedBy, BillofLading,) VALUES ('$salesorder', '$user', '$date', '$shipdate', '$quantity', '$cases', '$pallets', '$weight', '$shippedby', '$billoflading')", $connection); $that = mysql_query('SELECT * FROM shipped',$connection); $i = 0; while($result_row = mysql_fetch_array($that,MYSQL_ASSOC)) { echo ++$i; foreach($result_row as $key => $value) { echo $key . ' : ' . $value . '<br>'; }; echo '<br>'; }; mysql_close($connection); include('..\VariableReveal.php'); ?>

« previous php.general (#282047) next »