insert query mysql throws PDO::exec() expects exactly 1 parameter, 2 given

I’ve pieced together some code I’ve gleaned from the internet: I’m trying to scan a directory to insert file names and index into MariaDB table. My last hurdle it seems is this PDO error: PDO::exec() …

How can I convert this mysqli to PDO?

prepare(“SELECT * FROM userinfo order by id DESC”); $query->execute(); mysqli_stmt_bind_result($…

Issues converting stdClass to array

I have converted one of my websites to use PDO database queries. All the queries are working perfectly except one and I have spent all day trying to solve this problem and nothing is working for me so …

PHP array isn’t displaying in page

The list of notes should be displayed within the ul li spans, any reason as to why they aren’t showing and instead the array is showing at the top of the page? The database connection appears to be …

How do I successfully insert records from HTML form using php cleandata and sanitize functions

I have written a script to add records into my database with include functions for clean and sanitize the input data and my db connection file with query functions respectively but my problem is that …

PHP & PDO: Fastest way to fetch data from

I have an HTML table which is fetched with thousands of rows of messages and the date these were sent by an user and I’m currently trying to understand how to fetch the data faster, as it takes 5 to 9 …

SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens – help needed

I’ve tried making a website which has a database connected to it and I’m getting the error message below INSERT INTO Diák (oktatási_id, vezeték_név, kereszt_név, évfolyam, születési_dátum, város,…

PDO changes query

I want to have result of my query as it was before I replaced db connection using PDO. How can I get the query as i t was before I implemented PDO? This is my query: $query = “SELECT `…

Adding GROUP BY support to the ssp class in complex function

I am using datatables v 1.10.19 As i was using the following ,the group by destroys the pagination and only shows one page. $where = “recipient='”.$recipient.”‘ AND grouped=” GROUP BY id …

PHP Warning PHP Startup Unable to load dynamic library php_pdo_sqlsrv_7_ts_x64.dll

OS: Windows 8.1 Arch: x64 php: PHP 7.1.6 mssql: Mssql Server 2014 express driver: SQLSRV 4.0 IDE: PhpStorm I’m trying to get mssql drivers to work. I downloaded the pdo driver from …