Reply to Re: Apostrophe - when used it mucks with my odbc

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация