mrpck/mysqldb
Composer 安装命令:
composer require mrpck/mysqldb
包简介
The MySqlDB Class Library is a high level wrapper around the MySql.
README 文档
README
The MySqlDB Class Library is a high level wrapper around the MySql.
Install
Copy the files under src/ to your program
OR
composer require mrpck/mysqldb 1.0.2
Usage
use Mrpck\Mysqldb\MySqlDB; // connecting to db $db = new MySqlDB("localhost", "mydb"); if (!$db->db_connect_id) exit; $sql = "SELECT id, name, surname, phone, email FROM `users` "; $result = $db->sql_query($sql); $num_records = $result ? $db->get_num_rows($result) : 0; // check if row inserted or not if ($num_records > 0) { while ($row = $db->sql_fetchrow( $result )) { echo "<br/>"; print_r($row); } $db->sql_freeresult($result); }
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-05