Better use a “prepared statement”, see this link.
That finds a lot of errors and is safe.
More Related Contents:
- mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/virtua15/public_html/main/1515/dafreg.php on line 9 [duplicate]
- HTML Form/PHP connected but MySQL is empty
- Using PHP read word in textarea line by line and insert to mySQL
- How to create email notification with login users on PHP an MySQL [duplicate]
- PHP / PDO echo data from database into a table
- PHP display image BLOB from MySQL [duplicate]
- Error when preparing a multiple insert query
- CodeIgniter: Unable to connect to your database server using the provided settings Error Message
- What is the best collation to use for MySQL with PHP? [closed]
- Export MySQL database using PHP [closed]
- How to add new column to MYSQL table?
- Do SQL connections opened with PDO in PHP have to be closed
- mysql select query within a serialized array
- mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in php [duplicate]
- Category Hierarchy (PHP/MySQL)
- Alternative for mysql_num_rows using PDO
- ERROR: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it
- How to convert ISO8601 to Date format in php
- belongsToMany relationship in Laravel across multiple databases
- Algorithm for generating a random number
- return one value from database with mysql php pdo
- How can I pass an array of PDO parameters yet still specify their types?
- How can I do a migration in laravel 5.5?
- PHP Laravel: No connection could be made because the target machine actively refused it
- SQL Query with binary data (PHP and MySQL)
- How do I format numbers to have only two decimal places?
- How to get last inserted id from table MySQL [duplicate]
- Group mysql results by category and display them into groups under each category
- Save array in mysql database
- PHP & mySQL: When exactly to use htmlentities?