Skip to content
Advertisement

Tag: mysqli

Best way to INSERT many values in mysqli?

I’m looking for a SQL-injection-secure technique to insert a lot of rows (ca. 2000) at once with PHP and MySQLi. I have an array with all the values that have to be include. Currently I’m doing that: I tried call_user_func_array(), but it caused a stack overflow. What is a faster method to do this (like inserting them all at once?),

mysql sanitize row name

I’m currently writing a php framework with focus on security. I use a query builder to generate SQL-statements, so that it is not bound to MySQL. (Or SQL in general) I found certain posibilities that user could inject row names, so it has to escape them somehow. Because of how the query builder works, i sadly cannot use prepared statements.

Database Driver MySQLi Error

I am running Moodle test environment on Window Vista having PHP 5.2.10 and MySQL 5.1.36-Community. When I upgrade from Moodle 1.9.9 to 2.0, I am getting the following error. I also tried to change the dbtype=’mysqli’ in config.ini and still see same error. I would really appreciate if you can provide some suggestion to resolve this error. Thank you in

Couldn’t fetch Mysqli_result

I’ve got this error Warning: mysqli_fetch_array() [function.mysqli-fetch-array]: Couldn’t fetch mysqli_result in /home/fights7/public_html/include/load_more_home_posts.php on line 12 And would like to know what I’ve done wrong with the below code? Answer Straight away, it appears that you are calling mysqli_free_result() inside your fetch loop, so after the first loop iteration, your result resource has been closed and freed, and no more results

Advertisement