本文整理汇总了PHP中DataManager::selectAllFromTable方法的典型用法代码示例。如果您正苦于以下问题:PHP DataManager::selectAllFromTable方法的具体用法?PHP DataManager::selectAllFromTable怎么用?PHP DataManager::selectAllFromTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager
的用法示例。
在下文中一共展示了DataManager::selectAllFromTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getControlMessage
function getControlMessage($sid)
{
$dbM = new DataManager(SXN_USER, SXN_PASSWORD, "localhost", SXN_DATABASE_CONTROL);
$dbM->selectAllFromTable(SXN_CONTROL_TABLE_COMMANDS, SXN_CONTROL_COMMANDS_COLUMN_SID . "=" . "{$sid} AND " . SXN_CONTROL_COMMANDS_COLUMN_STATUS . "=" . "'new'");
//TODO add enum table for new, etc..
$numRes = $dbM->retrieveNumberOfResults();
if ($numRes > 0) {
while ($data = $dbM->retrieveResult()) {
echo " :" . $data[SXN_CONTROL_COMMANDS_COLUMN_COMMAND] . "\n";
}
//Update status to "executed"
$columns = array(SXN_CONTROL_COMMANDS_COLUMN_STATUS);
$values = array("executed");
$dbM->updateRow(SXN_CONTROL_TABLE_COMMANDS, $columns, $values, SXN_CONTROL_COMMANDS_COLUMN_SID . "=" . "{$sid} AND " . SXN_CONTROL_COMMANDS_COLUMN_STATUS . "=" . "'new'");
}
}
示例2: while
$do = 'list_order';
}
if ($do == 'del_order') {
$g_dbM3->deleteRow(SXN_CONTROL_TABLE_COMMANDS, 'id', $s_id);
$do = 'list_order';
}
if ($do == 'list_order') {
echo "<table border=\"1\">";
echo "<tr>";
echo "<td>SID</td> ";
echo "<td>ORDER</td>";
echo "<td>STATUS</td>";
echo "<td>TIMESTAMP</td>";
echo "<td>Action</td>";
echo "</tr>";
$g_dbM3->selectAllFromTable(SXN_CONTROL_TABLE_COMMANDS, "");
while ($data = $g_dbM3->retrieveResult()) {
$id = $data[SXN_GENERAL_COLUMN_ID];
$sid = $data[SXN_CONTROL_COMMANDS_COLUMN_SID];
$order = $data[SXN_CONTROL_COMMANDS_COLUMN_COMMAND];
$status = $data[SXN_CONTROL_COMMANDS_COLUMN_STATUS];
$ts = $data[SXN_GENERAL_COLUMN_TIMESTAMP];
echo "<tr>";
echo "<td>{$sid}</td>";
echo "<td>{$order}</td>";
echo "<td>{$status}</td>";
echo "<td>{$ts}</td>";
echo "<td><a href=\"sxn_config.php?do=del_order&a_id={$id}\">delete</a></td>";
echo "</tr>";
}
echo "</table>";