santosh22 Posted July 6, 2013 Share Posted July 6, 2013 Hi, I am using a grid function which creates a data grid based on the query provided. this is rich & now i find that i need to convert all functions into mysqli compatible. below are the error lines // execute the query through the "database" object $this->queryResult = $this->dbRefference->query($this->query); // get the total number of records in the result (ignoring the LIMIT) $this->totalRecords = $this->dbRefference->foundRows; this shows error as "Notice: Undefined property: mysqli_ext::$foundRows " attaching the file for reference. any help is highly appreciated. Thanks class.datagrid-backup.php Link to comment https://forums.phpfreaks.com/topic/279912-convert-mysql-database-function-to-mysqli/ Share on other sites More sharing options...
boompa Posted July 6, 2013 Share Posted July 6, 2013 This is the manual page for mysqli. Do you see anything called foundRows there? Maybe there's something else there that accomplishes what you want. Please learn to read your errors, understand them, and reference the PHP manual. Link to comment https://forums.phpfreaks.com/topic/279912-convert-mysql-database-function-to-mysqli/#findComment-1439633 Share on other sites More sharing options...
mac_gyver Posted July 6, 2013 Share Posted July 6, 2013 you need to modify the database class to use mysqli statements, not replace the database class with an instance of the mysqli class. what was the original code for the database class? perhaps it is already using mysqli or pdo and you don't need to do anything? Link to comment https://forums.phpfreaks.com/topic/279912-convert-mysql-database-function-to-mysqli/#findComment-1439637 Share on other sites More sharing options...
jcbones Posted July 6, 2013 Share Posted July 6, 2013 Seeing the error points to a class called mysqli_ext, I would say this class is dependent on that class. $foundRows should contain the resultSet from your query. Link to comment https://forums.phpfreaks.com/topic/279912-convert-mysql-database-function-to-mysqli/#findComment-1439643 Share on other sites More sharing options...
boompa Posted July 6, 2013 Share Posted July 6, 2013 Ah! Not using mysqli I didn't realize this was some sort of wrapper or something. My bad. And I missed the attached file. Damn, I'm slipping! Link to comment https://forums.phpfreaks.com/topic/279912-convert-mysql-database-function-to-mysqli/#findComment-1439651 Share on other sites More sharing options...
santosh22 Posted July 8, 2013 Author Share Posted July 8, 2013 Thanks, I was looking for a guidance or standard where the conversion of mysql to mysqli is provided. I will dig more into internet and get it done. Link to comment https://forums.phpfreaks.com/topic/279912-convert-mysql-database-function-to-mysqli/#findComment-1439869 Share on other sites More sharing options...
santosh22 Posted July 8, 2013 Author Share Posted July 8, 2013 Well, I have completed the changes. By doing this, I am using a single object in all of my components that access db in a php page. i m hopeful that it will improve my performance, else i will again see you guys in this forum. thanks for all your help. This forum is really helpful for every question I have. Link to comment https://forums.phpfreaks.com/topic/279912-convert-mysql-database-function-to-mysqli/#findComment-1439874 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.