Page 1 of 1
SQL syntax or somethin..
Posted: Wed Apr 28, 2010 4:59 pm
by bla5e
Code: Select all
$sql = pg_query($db,"UPDATE history SET action='{$from}' WHERE action='{$to}' AND author='{$uid}' AND ideaid={$_POST['idea']}");
ERROR: syntax error at end of input at character 100
Ive been looking and maybe its jsut been a long day, but i cant find it?
action/author = text
ideaid = #
Re: SQL syntax or somethin..
Posted: Wed Apr 28, 2010 5:06 pm
by Christopher
If you do this, what is the actual SQL statement being executed?
Code: Select all
$sql = "UPDATE history SET action='{$from}' WHERE action='{$to}' AND author='{$uid}' AND ideaid={$_POST['idea']}";
echo "sql=$sql<br/>";
$result = pg_query($db, $sql);
Re: SQL syntax or somethin..
Posted: Thu Apr 29, 2010 12:57 pm
by bla5e
Christopher wrote:If you do this, what is the actual SQL statement being executed?
Code: Select all
$sql = "UPDATE history SET action='{$from}' WHERE action='{$to}' AND author='{$uid}' AND ideaid={$_POST['idea']}";
echo "sql=$sql<br/>";
$result = pg_query($db, $sql);
thanks, passing the wrong variable
