|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37491 I have Error in Inserting item to my DB
Submitted: 2006-05-18 09:01 UTC Modified: 2006-05-18 09:10 UTC
From: peymanium1 at yahoo dot com Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 5.1.4 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: peymanium1 at yahoo dot com
New email:
PHP Version: OS:


 [2006-05-18 09:01 UTC] peymanium1 at yahoo dot com
 have problem when inserting data to my MS Access DB.
It gives error

I'm using odbc_exec () function.

Can anyone help me please!
I have to submit my project on saturday!

Reproduce code:
$db = odbc_connect('ezLearning', 'peyman', 'attarzadeh') or die('Could
Not Connect to ODBC Database!'); 
$q = "INSERT INTO [t1]([username],[password]) VALUES ($a,$b);";
odbc_exec ($db,$q);

Expected result:
the result should be anything you entered for the values $a and $b.

Actual result:
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\ezLearning\test2_complete.php on line 14


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-18 09:10 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Read the error message
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 17 15:03:34 2022 UTC