|
Posted by Toby A Inkster on 05/14/07 09:14
Johnny BeGood wrote:
> $query = 'INSERT INTO Tasks (TaskType, Details) VALUES ($tasktype,
> $taskdetails)';
> $stmt = odbc_prepare($odbc, $query);
> if (!odbc_execute($stmt, array($tasktype, $taskdetails)))
> {
> echo odbc_errormsg();
> }
As you've already been told, you are using prepared queries incorrectly.
Try:
$query = 'INSERT INTO Tasks (TaskType, Details) VALUES (?, ?);';
$stmt = odbc_prepare($odbc, $query);
if (!odbc_execute($stmt, array($tasktype, $taskdetails)))
{
echo odbc_errormsg();
}
--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
[Back to original message]
|