Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question Good colleagues, I am learning PHP a little more thoroughly since I am a bit newbie, I already did database queries with MySQLi and I
Tag: pdo
PDO insert array in array
i’m confused … I am encountering a tiny issue that drives me crazy. I have arrays in an array which i’d like to insert into an SQL table. My issue is that i don’t figure out how to insert arrays in an array … The arrays: Array ( [1] => Array ( [diploma] => Master [institut] => IAE ) [2]
Firebird driver not found in PHP or XAMPP
I lost a day trying to connect to a firebird database when I started my first PHP project with it, so I want to share my solutions that maybe can help others in the future (or myself). Answer There are few rules but very important: Check your PHP architecture (32 or 64 bits) Check the database version (if you have
Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
I’m trying to use a prepared array in a PDO query. I have the following code : This give me the following error : Uncaught PDOException: SQLSTATE[HY093]…(same as title) Usually I would execute my query like this : but this time the array is built dynamically. (I put it in this example how it’s shown with a print_r. I guess
Updating postgres with if conditions on parameters
I am trying to do a postgres update using if conditions to check if a parameter is empty before attempting to update. The desired result would be not to update when the parameter is an ampty string. I cannot seem to figure out the correct way to do this. My first attempt is below: and then my second attempt was
PHP – Issue with PDO using CONCAT() with SQLite
I’m using the same query, through PDO connector, to concatenate string in both: MySQL database and a mirroring SQLite one. Both they have same table same structure etc. But when the query is executed, MySQL performs the query correctly, while SQLite goes in error thus I get an error 500. Is there a solution to have it working for both
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 …
fetchAll only fetches one row from two joined tables
I have a join of two tables. Actually the code and the fetching worked fine before I inserted : and But now it only fetches the first row even though there are two: I used fetchAll and a foreach loop so I just don’t see why it is only fetching the first row. Maybe someone can help, thank you! Answer
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 once I submit the form No Closeable Alert message is displayed and record is not inserted into the table either. Here is my script for