php in_array does not work when comparing with a mysql row Programming Web Development by Ehsan_4 …'t set these flags properly. I know I should use msqli or pdo but this on testing server. PHP in_array does… mysql to mysqli Programming Databases by nitos ` how do i change from msql to msqli the below statement, am learning this mysql but keep getting … Re: mysql to mysqli Programming Databases by imti321 just change msql to msqli where ever you find it.But you also can see online the structure of both commands and thier parameters and change accordingly.e.g mysql takes 2 parameters mysqli may take three so check it out online and change accordingly. Fatal error: Call to a member function fetch_result() on a non-object in Programming Web Development by davidjennings …;country"; $targetpage = "index.php"; $limit = 10; $query = $msqli->query("SELECT COUNT(*) as num FROM $tableName"… Re: Fatal error: Call to a member function fetch_result() on a non-object in Programming Web Development by davidjennings Melvita, Thanks for your reply Fatal error: Call to a member function query() on a non-object in index.php on line 67 which is $query = $msqli->query("SELECT COUNT(*) as num FROM $tableName"); thanks again david Re: help with mysql and mysqli Programming Databases by peter_budo … it does look like your DB is set to use msqli and there for will not accept the other request. More… Re: My database connection dies but doesnt print an error Programming Web Development by andrewsCWD … hosts FAQ's on mysql I noticed they didnt use msqli in their examples. That was the problem they dont support… Re: Error: Commands out of sync; you can't run this command now Programming Web Development by sam023 … i made two config file.. one with mysql other with msqli..!!! [code=php] $query1 = "call new_user('$cardDigits','$cardNo','$amount','$traiff… Re: Error: Commands out of sync; you can't run this command now Programming Web Development by Atli … i made two config file.. one with mysql other with msqli..!!![/QUOTE] That's actually pretty bad. Really bad, to be… Re: Call to undefined function mysqli_connect() Programming Web Development by veedeoo … mysqli is activated or not.. echo (function_exists('mysqli_connect')) ? 'Yes your msqli extension is activated' : ' NO! You gonna try a little harder… Re: Page Limit Error Programming Web Development by Fernando_4 ….php.net/manual/en/intro.mysql.php), try looking into [msqli](http://pt2.php.net/mysqli) or [pdo](http://www.php… Re: Insert data from multiple checkbox values into database Programming Web Development by ernesto22 …;INSERT INTO requisition ('pending')"; here is an example of msqli first create a new page called Mysqli.php <?php… Re: Need help With php connection Programming Web Development by imti321 first one give msqli error name and second one gives error number . msqli help Programming Databases by poolanex im looking to convert this code using prepared statments if possible but am open to suggestions [CODE=php] function list_owner_notes(){ $id = $this->id; $sql = "SELECT nid, title FROM notes JOIN hubs ON notes.hub_url=hubs.hub_url WHERE owner = '$id'"; $result = mysql_query($sql) or die(mysql_error… Re: msqli help Programming Databases by nileshgr Use PDO. It makes life easier. Everything integrated at one place and simple API. I shifted from mysql-mysqli to PDO-mysql. Converting mysql functions to msqli Programming Web Development by davidjennings Hi I am trying to convert the following mysql function to mysqli. Thanks in advance David <?php /*------------------------------------------------- This class contains generic database functions to view, add, edit and delete all facets of a database -------------------------------------------------*/… Re: Converting mysql functions to msqli Programming Web Development by diafol >Hi I am trying to convert the following mysql function to mysqli. OK, so what do you want? You say that you're trying to convert it - where? I can't see where you've placed any mysqli functions. Is it the case that you want us to do it for you? Re: Converting mysql functions to msqli Programming Web Development by davidjennings Hi diafol, not expected at all. I replaced the code with my original settings to help make it clear what I had started with.(no offence intended) This was the warning that I received. Thanks Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in /home/djenning/public_html/test/includes/functions/database.php on line 22 OK… Re: Converting mysql functions to msqli Programming Web Development by diafol >no offence intended None taken. Just couldn't see what was required. :) Since you're using a class, you may want to use the OOP format rather than the procedural code. You could probably to with class Database extends mysqli That way Database inherits all of the native functions of the mysqli object. Rename some of them if you … Re: php in_array does not work when comparing with a mysql row Programming Web Development by peeyush.budhia Your code seems correct, please share your table structure so that I can check further. Re: php in_array does not work when comparing with a mysql row Programming Web Development by peeyush.budhia Your code seems correct, please share your table structure so that I can check further. Re: php in_array does not work when comparing with a mysql row Programming Web Development by Ehsan_4 Thanks Peeyush. CREATE TABLE IF NOT EXISTS `ukpostcodes` ( `postcode` varchar(10) NOT NULL, `town` varchar(80) NOT NULL, PRIMARY KEY (`postcode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Re: php in_array does not work when comparing with a mysql row Programming Web Development by Ehsan_4 I solved the issue by using the trim() function. Re: mysql to mysqli Programming Databases by pritaeas https://www.daniweb.com/web-development/php/code/434480/using-phpmysqli-with-error-checking https://www.daniweb.com/web-development/php/code/462098/mysqli-binding-example Re: mysql to mysqli Programming Databases by imti321 https://wikis.oracle.com/display/mysql/Converting+to+MySQLi Re: Fatal error: Call to a member function fetch_result() on a non-object in Programming Web Development by melvita try this please : while ($row = $result->fetch_object()) { echo '<li>'.$row->country.'</li>'; } Re: Fatal error: Call to a member function fetch_result() on a non-object in Programming Web Development by davidjennings Melvita, I can see I have missed out the y in mysqli, so I have corrected this and I get the same error. Fatal error: Call to a member function fetch_object() on a non-object in /index.php on line 167 Thanks again David Re: Fatal error: Call to a member function fetch_result() on a non-object in Programming Web Development by pritaeas Do `print_r($result)` after line 18 to see what exactly it contains. Re: Fatal error: Call to a member function fetch_result() on a non-object in Programming Web Development by melvita What is the result of pritaeas suggestion print_r($result) at line 19 ? The error tell you that $result is not an object so you can try this : **while($row = $mysqli->fetch_object($result)){** Re: Fatal error: Call to a member function fetch_result() on a non-object in Programming Web Development by davidjennings Hi Pritaeas, Thanks for your assistance $result = $mysqli->query("SELECT * FROM $tableName LIMIT $start, $limit"); print_r($result); I have added the above code and i have no output I have also added the print_r on the below execution which is on line 7 also no output $query = $mysqli->query("SELECT COUNT…