|
Posted by Johnny BeGood on 05/13/07 16:40
Hi Micha,
If I enter didn''t it works, if I enter didn't it comes back with the same
error as before
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
query expression ''didn't',
This is what I have
$query = 'INSERT INTO Tasks (TaskType, Details) VALUES ($tasktype,
$taskdetails)';
$stmt = odbc_prepare($odbc, $query);
if (!odbc_execute($stmt, array($tasktype, $taskdetails)))
{
echo odbc_errormsg();
}
Where am I going wrong (:
Cheers
"Michael Fesser" <netizen@gmx.de> wrote in message
news:620e43h7j285ii1h6glq2ak8lnoj5gs273@4ax.com...
> // query string with 2 placeholders
> $query = 'INSERT INTO Tasks (TaskType, Details) VALUES (?, ?)'; - this
> throws a field count error, silly me?
>
> // prepare the statement
> $stmt = odbc_prepare($odbc, $query);
>
> // pass all parameters in an array and execute the statement
> if (!odbc_execute($stmt, array($tasktype, $taskdetails))) {
> ...
> }
>
> HTH
> Micha
Navigation:
[Reply to this message]
|