I am attempting to UPDATE a table and I have having absolutely ZERO
success. Here is the query:
$tmp = $_POST['sbcuid'].-.$_POST['system'][$a];
$update = UPDATE accounts SET atime='NOW()' WHERE
\id-sys\='.$tmp.';
echo $update;
$result1 =
$tmp = $_POST['sbcuid'].-.$_POST['system'][$a];
$update = UPDATE accounts SET atime='NOW()' WHERE
\id-sys\='.$tmp.';
echo $update;
$result1 = mysql_query($update, $Prod) or die(mysql_error());
echo mysql_affected_rows();
Try:
$update = UPDATE accounts SET atime=NOW() WHERE id-sys='$tmp';
-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 1:35 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Update Query Help...
I am attempting to UPDATE a table and I have having absolutely ZERO
success. Here is the query:
$tmp = $_POST['sbcuid
SCOTT,
I am attempting to UPDATE a table and I have having absolutely ZERO
success. Here is the query:
$tmp = $_POST['sbcuid'].-.$_POST['system'][$a];
$update = UPDATE accounts SET atime='NOW()' WHERE
\id-sys\='.$tmp.';
echo $update;
$result1 = mysql_query($update, $Prod) or
] Update Query Help...
$tmp = $_POST['sbcuid'].-.$_POST['system'][$a];
$update = UPDATE accounts SET atime='NOW()' WHERE
\id-sys\='.$tmp.';
echo $update;
$result1 = mysql_query($update, $Prod) or die(mysql_error());
echo mysql_affected_rows();
Try:
$update = UPDATE accounts SET atime
. Holmes'; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Update Query Help...
SCOTT,
The list's crystal ball filter is down for maintenance.
Show us the tbl schema and the debug print of $update.
Then we won't be firing blind!
=dn
I understand that the column name does not normally need quotes
I have definitely isolated the problem. If I change the column name
that the match is being performed on from 'id-sys' to 'id_sys' I can
execute
the query without having to worry about quoting the column name and
everything works. I think that I am just going to leave the column name