php ajax insert shows blank response but no error

I am simply inserting a demo data by ajax form to database. The ajax shows no error but shows blank response when i use console.log(response);. Php code- <form role="form" id="…

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() …

SQLite FTS5 through PHP/PDO – How to bind values while filtering on a column name?

In a FTS5 MATCH clause, column names used as filters are declared with an ending colon, like in: … WHERE ftstable MATCH ‘colname: keyword’ (as per https://sqlite.org/fts5.html#fts5_column_filters) …

Subquery in INSERT executed differently in PDO than SQL

I want to insert a new dataset into a MySQL table tab with external data, but also with data from another table otherTab using the others’ table primary key and another condition. However, it could be …

How can I convert this mysqli to PDO?

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

PHP Group PDO or JSON results by 3 fields and output

I’m trying to group my results in an array by the 3 fields delivery_date, van_no and drop_no, this is what i have so far: // Gets all orders and sorts by delivery date, van and drop number $…

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 …

creating a quiz with php and pdo

I’ve created a quiz for my website, the admin can sign in and change the questions or add questions etc. For the quiz page I’m taking the information down like so: try { $stmt = $db->query(‘…