Skip to content

Tag: mysqli

Testing php / mysqli connection

I am looking for a way to test just the connection portion of a php / mysqli connection. I am migrating from a LAMP server build on Vista to the same on Ubuntu and am having fits getting mysqli to work. I know that all of the proper modules are installed, and PhpMyAdmin works flawlessly. I have migrated a site

Return an array from mysqli stmt query

I’m trying to convert a site to use prepared mysql statements, however I’m having some trouble replacing my use of fetch_array(). The comments on offer a solution which I would have thought should work but for some reason I’m getting strange undefined constant errors when calling a function via call_user_func_array() can someone suggest a better way of doing it?

How to bind mysqli parameters using loop and store results in array?

The code above gets the value from genreID when dbGenre is equal to $genre. And then store the results in an array. But it’s not working because $genre is an array, so I need to loop through it to get a different value from genreID each time. The ‘genres’ table contains two columns: genreID (INT) and dbGenre (VARCHAR) I just

Variable parameter/result binding with prepared statements

In a project that I’m about to wrap up, I’ve written and implemented an object-relational mapping solution for PHP. Before the doubters and dreamers cry out “how on earth?”, relax — I haven’t found a way to make late static binding work — I’m just working around it in the best way that I possibly can. Anyway, I’m not currently