Ratings | | Unique User Downloads | | Download Rankings |
Not enough user ratings | | Total: 204 | | All time: 8,443 This week: 488 |
Version | | License | | PHP version | | Categories |
basic-mysql 7 | | Freeware | | 7 | | Databases, PHP 7 |
|
Description | | Author |
This class can run MySQLi queries and return iterator objects.
It can connect to a given MySQL database using MySQLi and execute SQL queries.
The class returns as result an object of an anonymous class that can iterate over the query results and return result data records and other details. | |
|
Example
<?php
declare(strict_types=1);
// Include MySQL class
require_once('inc/basicmysql.class.php');
// Include database connection
require_once('inc/global.inc.php');
function showProfile() {
global $DB;
if ($result = $DB->query("SELECT id, name, age, number FROM profile")){
if (!defined('TABLE')) define ('TABLE',['id','name','age','number']);
while ($sqlReg=$result->fetch()) {
echo("<p>Candidate with ID \"".$sqlReg[TABLE[0]]."\" named ".$sqlReg[TABLE[1]].
" with ".$sqlReg[TABLE[2]]." years old with mobile ".$sqlReg[TABLE[3]].
" may wait for interview.</p>");
}
}
}
showProfile();
?>
|
Details
basicmysqli-class
Basic MySQL Class for PHP 7
This class can run MySQLi queries and return iterator objects.
It can connect to a given MySQL database using MySQLi and execute SQL queries.
The class returns as result an object of an anonymous class that can iterator over the query results and return result data records and other details.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.