I’m currently working my way through “PHP and MySQL Web Development.” I’ve successfully created databases and been able to make tables and use the database. I’ve also successfully completed all the …
Tag: mysqli
Fatal error: Call to undefined method mysqli_result::fetch_all()
I have problems with PHP in Ubuntu 10.04. When I try use mysqli_result::fetch_all this error appears: Call to undefined method mysqli_result::fetch_all() However, it works in Windows XP. The Code: I don’t want to use fetch_assoc with a loop because I send the result to another layer for processing. I’m using PHP 5.4.4. and with php -m | grep mysql the
Failure to connect to mySQL DB via PHP (msqli object-oriented issue)
I’m trying to connect from my Heroku app to a mysql db (Xeround) in an object-oriented way: $this->db = new mysqli( Credentials::databaseHost(), Credentials::databaseUsername(), …
What does the mysqli_error() expects parameter 1 to be mysqli, null given mean?
I have this PHP page: This is returning the error Warning: mysqli_error() expects parameter 1 to be mysqli, null given. Any idea why? Answer You need to define: $dbc before ex:
How do I ensure I caught all errors from MySQLi::multi_query?
The docs for multi_query say: Returns FALSE if the first statement failed. To retrieve subsequent errors from other statements you have to call mysqli_next_result() first. The docs for next_result say: Returns TRUE on success or FALSE on failure. Finally, the example posted in the docs for multi_query use the return value from next_result to determine when there are no more
Mysqli not installed?
I get the following error: Fatal error: Class ‘mysqli’ not found in my php script I have php5.3.3-7 installed and I get this when I run apt-cache show php5-mysql There is nothing about mysql at all in php info. How do I find the extention and do I have to istall it? There are many references to mysqli in my
MySQLi PHP Extension Problems
Whenever a query finishes executing, I know you should free the result. Here is a snippet of a class I built for running a simple query. Could someone tell me where I went wrong? The query, when entered properly, runs successfully. It’s just that my page doesn’t reload like it, should but it gives me these errors… … and this
Does php5.3 support mysqli extension without any additional manual configurations/updates?
I’ve built a PHP based website with MySQL as the back-end, and am planning to put it online now. The issue is that I’ve used mysqli extension in the PHP scripts extensively, and right now I’m worried …
How do I get NULL into a MySQL integer column with PHP/MySQLi?
I’m passing values into a PHP page through the URL and using them in queries with MySQLi. The problem is that an empty string gets converted to zero for an integer column, when in fact it needs to be NULL. How do I get NULL into an integer column with PHP/MySQLi, from a param passed in the URL? Update: Here’s
Why MySQLi prepared statements?
What are the advantages of using prepared statements with MySQLi? If the only purpose is to secure the query, isn’t it better to clean the query using something like mysqli_real_escape_string instead of writing so many lines of code for each query (like prepare, bind_param, execute, close, etc.)? Answer Preparing statements is not just for code security. It helps the SQL