Skip to content
Advertisement

Tag: database

odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect

I have some problem in PHP using MS Access database, when I running the query in PHP show error odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect But when I’m going echo the “$query” variable and running the syntax in Microsoft Access is running well. And this is my query: And

Database connection not configured

I am currently doing a local project, using MAMP with PHP version 7.4.21 and I can’t seem to run my system because the database is not configured correctly. Here’s my .env and here’s my database.php Answer DB_CONNECTION is the driver that you will use

write in database (php/mySQL)

The problem is very simple (and everything, php and html is on one file(.php)) html part: the result is die(‘formulaire incomplet’);,and nothing is written in the database, i don’t see why. Any clue is welcome! thanks by advance Answer First, use the bound parameters method for all your data. Second set PDO to generate exceptions, then if the query does

One big update query, or several single update queries, to update a value in MySQL multi-tenant database

I’m working in a ‘point of sale’ application (PHP + MySQL), with products, sales, product quantity that have to be updated (+ or -) depending on the operation (sale/buy), etc. On every sale/buy, I save the operation data (date, customer, totals…) in an ‘invoices’ table, and the details (all products in the invoice) in a ‘invoicecontents’ table. Ok, you got

Advertisement