odbc_exec error
am 01.06.2006 21:19:50 von Scott Wettstein
I'm pretty new to PHP so I need help. I'm getting this error:
Error in updating SQL PHP Warning: odbc_exec() [function.odbc-exec]: SQL
error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 2., SQL state 07001 in SQLExecDirect in
c:\Inetpub\wwwroot\shout.php on line 77
Lines 76 and 77:
$sql="UPDATE shout SET UserName=$laName,Message=$laMessage WHERE
Dat=$laDate";
$updating=odbc_exec($conn,$sql);
where $laName, $laMessage, and $laDate are from a POST. I've checked my
spelling a million times and changed the names of variables. Why is it still
complaining? Please help!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: odbc_exec error
am 01.06.2006 21:22:05 von Bastien Koert
is $conn defined?
Bastien
>From: "Scott Wettstein"
>To: php-db@lists.php.net
>Subject: [PHP-DB] odbc_exec error
>Date: Thu, 1 Jun 2006 14:19:50 -0500
>
>I'm pretty new to PHP so I need help. I'm getting this error:
>
>Error in updating SQL PHP Warning: odbc_exec() [function.odbc-exec]: SQL
>error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
>Expected 2., SQL state 07001 in SQLExecDirect in
>c:\Inetpub\wwwroot\shout.php on line 77
>
>Lines 76 and 77:
>
>$sql="UPDATE shout SET UserName=$laName,Message=$laMessage WHERE
>Dat=$laDate";
>
>$updating=odbc_exec($conn,$sql);
>
>
>
>where $laName, $laMessage, and $laDate are from a POST. I've checked my
>spelling a million times and changed the names of variables. Why is it
>still
>complaining? Please help!
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: odbc_exec error
am 01.06.2006 21:31:04 von Brad Bonkoski
Scott Wettstein wrote:
>I'm pretty new to PHP so I need help. I'm getting this error:
>
>Error in updating SQL PHP Warning: odbc_exec() [function.odbc-exec]: SQL
>error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
>Expected 2., SQL state 07001 in SQLExecDirect in
>c:\Inetpub\wwwroot\shout.php on line 77
>
>Lines 76 and 77:
>
>$sql="UPDATE shout SET UserName=$laName,Message=$laMessage WHERE
>Dat=$laDate";
>
>$updating=odbc_exec($conn,$sql);
>
>
>
>where $laName, $laMessage, and $laDate are from a POST. I've checked my
>spelling a million times and changed the names of variables. Why is it still
>complaining? Please help!
>
>
>
it says a SQL error ;-)
I would check to see if you need quotes around your variables...
like:
$sql = "update shout set UserName='$laName', Message='$laMessage' where ....
-Brad
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php