still not working,
$sesdb = new PDO('sqlite:file.sqlite3');
$query="SELECT ZNAME, ZQUANTITY, ZPRODUCTID FROM ZITEM WHERE
ZCategory != 14";
$statement= $sesdb->query($query);
$result=$statement->fetchAll();
foreach ($result as $product) {
$prodname=$product[0];
$prodqty = $product[1];
$prodid=$product[2];
$sql = "UPDATE ZITEM SET ZQUANTITY='0' WHERE ZPRODUCTID={$prodid}";
$sesdb->exec($sql);
}
On 20 Aug 2008, at 09:59, Evert Lammerts wrote:
$sql = "UPDATE ZITEM SET ZQUANTITY='0' WHERE ZPRODUCTID='".
$prodid."'";
Try to unquote $prodid:
$sql = "UPDATE ZITEM SET ZQUANTITY='0' WHERE ZPRODUCTID={$prodid}";
Evert
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php