|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37490 I have Error in Inserting item to my DB
Submitted: 2006-05-18 08:57 UTC Modified: 2006-05-18 09:11 UTC
From: peymaniu1 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
 [2006-05-18 08:57 UTC] peymaniu1 at yahoo dot com
I 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:11 UTC]
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu May 19 19:04:05 2022 UTC