namespace test;
require_once __DIR__ . '/WDBConnection.php';
use bitmaster\db;
use bitmaster\db\exception\WDBException;
use bitmaster\db\exception\WDBPDOException;
try {
$db = new db\WDBConnection('works_db', 'u44871', 'works_db');
$result = $db->createCommand()->select('login')->from('f5_users')->where('id=:id', array(':id' => 1))->query();
print_r($users = $result->readFetchAssoc());
} catch (WDBPDOException $e) {
echo "current_line:".__LINE__."<br>".$e->getMessage();
} catch (WDBException $e) {
echo "current_line:".__LINE__."<br>".$e->getMessage();
}
try {
$sql = "select login from f5_users where id = :id";
$result = $db->createCommand($sql)->query(array(':id' => 1));
$result->read();
} catch (WDBPDOException $e) {
echo "current_line:".__LINE__."<br>".$e->getMessage();
} catch (WDBException $e) {
echo "current_line:".__LINE__."<br>".$e->getMessage();
}
-
Notifications
You must be signed in to change notification settings - Fork 0
wondertalik/WDBManager
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published