本文整理汇总了PHP中ExecuteQuery函数的典型用法代码示例。如果您正苦于以下问题:PHP ExecuteQuery函数的具体用法?PHP ExecuteQuery怎么用?PHP ExecuteQuery使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ExecuteQuery函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CalculateAlgorithm
function CalculateAlgorithm($user_id)
{
$rows = ExecuteQuery("SELECT\n *\n FROM\n algorithm s\n WHERE\n id = 1");
//var_dump($rows);
$data = array('hot_tip' => 'Guillermo to win 15:30', 'advert' => 'Win an iPad', 'teaser' => '15/1 Odds on favourite');
return $data;
}
示例2: saveStateCreation
public function saveStateCreation($postvars)
{
$stringURL = str_replace(' ', '-', $postvars['display_name']);
// Converts spaces to dashes
$stringURL = urlencode($stringURL);
$params = array(NULL, $postvars['region'], $postvars['display_name'], $stringURL);
// $query = "INSERT INTO tours(id, region, thumb, title, slug, content, isfeatured) VALUES (NULL, '".$postvars['region']."', '".$postvars['thumb']."', '".$postvars['title']."', '".$postvars['slug']."', '".$postvars['content']."', ".$isfeatured.");";
$query = "INSERT INTO states(state_id, type, display_name, url_name) VALUES (NULL, '" . $postvars['region'] . "', '" . $postvars['display_name'] . "', '" . $stringURL . "');";
echo $query;
$result = ExecuteQuery($query);
return $result;
}
示例3: store
function store(array $fields, array $values, $table, $where = "")
{
$prepareFields = "";
$prepareValues = "";
$preparebin_param;
foreach ($fields as $i => $value) {
$prepareFields .= $fields[$i] . ",";
$prepareValues .= "?,";
$preparebin_param[] = substr(gettype($prepareValues[$i]), 0, 1);
}
$prepareFields = "(" . substr($prepareFields, 0, -1) . ")";
$prepareValues = "(" . substr($prepareValues, 0, -1) . ")";
$query = "insert into " . $table . $prepareFields . " values" . $prepareValues . " " . $where;
echo $query;
ExecuteQuery($query, $preparebin_param, $values);
}
示例4: VT520GA_picklistMigrate
function VT520GA_picklistMigrate()
{
global $adb;
$columnList = $adb->getColumnNames('vtiger_invoicestatus');
//fix the typo, where invoice is spelled as inovice
if (in_array('inovicestatusid', $columnList)) {
$sql = 'alter table vtiger_invoicestatus change inovicestatusid invoicestatusid int(19)';
ExecuteQuery($sql);
}
}
示例5: LoadCompanyFeedsSettings
function LoadCompanyFeedsSettings($user_id)
{
$company_feeds = ExecuteQuery("SELECT \n\t\t\t\tfeed_identifier\n\t\t\tFROM\n\t\t\t\tcompany_feeds\n\t\t\tWHERE\n\t\t\t\tuser_id = {$user_id}");
//var_dump($company_templates); exit;
return $company_feeds;
}
示例6: ExecuteQuery
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once 'include/utils/utils.php';
//5.2.1 to 5.3.0RC database changes
$adb = $_SESSION['adodb_current_object'];
$conn = $_SESSION['adodb_current_object'];
$migrationlog->debug("\n\nDB Changes from 5.3.0RC to 5.3.0 -------- Starts \n\n");
ExecuteQuery("UPDATE vtiger_field SET quickcreate=0 WHERE fieldname='time_start' AND tabid=" . getTabid('Calendar'));
ExecuteQuery("ALTER TABLE vtiger_links ADD COLUMN handler_path VARCHAR(128) DEFAULT null");
ExecuteQuery("ALTER TABLE vtiger_links ADD COLUMN handler_class VARCHAR(32) DEFAULT null");
ExecuteQuery("ALTER TABLE vtiger_links ADD COLUMN handler VARCHAR(32) DEFAULT null");
ExecuteQuery("UPDATE vtiger_organizationdetails SET logoname='vtiger-crm-logo.gif' WHERE logoname='vtiger-crm-logo.jpg'");
ExecuteQuery("UPDATE vtiger_organizationdetails SET organizationname='vtiger Systems Pvt Ltd' WHERE organizationname='vtiger'");
$migrationlog->debug("\n\nDB Changes from 5.3.0RC to 5.3.0 -------- Ends \n\n");
示例7: ExecuteQuery
{
if(f.ata.value=="")
{
document.getElementById("spuid").innerHTML = "Please, Enter Answer.";
//alert("Please,Enter The Answer")
f.ata.focus();
return false;
}
else
return true;
}
</script>
<?php
$sql = "SELECT heading from question where question_id={$_GET['id']}";
$rows = ExecuteQuery($sql);
$row = mysql_fetch_array($rows);
?>
<form action="answerH.php" method="POST" onsubmit="return check(this)">
<input type="hidden" value="<?php
echo $_GET["id"];
?>
" name="qid" />
<table>
<tr><td><b>RE : <?php
echo $row["heading"];
?>
</b></td></tr>
<tr><td>Answer:</td></tr><br/>
<tr><td><textarea rows="4" cols="38" name="ata"></textarea><span id='spuid' style="color: red;"></span></td></tr><br/>
示例8: updateReportColumns
function updateReportColumns($table)
{
global $adb;
$report_update_array = array("vtiger_campaign" => "(vtiger_reportmodules.primarymodule='Potentials' OR vtiger_reportmodules.secondarymodules = 'Potentials') AND {$table}.columnname LIKE '%vtiger_campaign%'", "vtiger_vendorRel" => "{$table}.columnname LIKE '%vtiger_vendorRel%'", "vtiger_potentialRel" => "{$table}.columnname LIKE '%vtiger_potentialRel%'");
foreach ($report_update_array as $key => $where) {
$query = "SELECT vtiger_report.reportid as reportid,{$table}.columnname AS columnname FROM vtiger_report INNER JOIN {$table} ON {$table}.queryid = vtiger_report.reportid INNER JOIN vtiger_reportmodules ON vtiger_reportmodules.reportmodulesid = vtiger_report.reportid WHERE {$where}";
$result = $adb->query($query);
if ($adb->num_rows($result) > 0) {
for ($i = 0; $i < $adb->num_rows($result); $i++) {
$reportid = $adb->query_result($result, $i, "reportid");
$colname = $adb->query_result($result, $i, "columnname");
$column_array = split(":", $colname);
$column = split("_", $column_array[2]);
$mod_name = $column[0];
$newcolname = str_replace("{$key}", $key . "{$mod_name}", $colname);
ExecuteQuery("UPDATE {$table} SET columnname = '" . $newcolname . "' WHERE queryid = " . $reportid . " AND columnname = '" . $colname . "'");
}
}
}
$query = "SELECT vtiger_reportmodules.primarymodule as primarymodule, vtiger_report.reportid as reportid,{$table}.columnname AS columnname FROM vtiger_report INNER JOIN {$table} ON {$table}.queryid = vtiger_report.reportid INNER JOIN vtiger_reportmodules ON vtiger_reportmodules.reportmodulesid = vtiger_report.reportid WHERE {$table}.columnname LIKE 'vtiger_products%:products_description:%'";
$result = $adb->query($query);
if ($adb->num_rows($result) > 0) {
for ($i = 0; $i < $adb->num_rows($result); $i++) {
$pri_module = $adb->query_result($result, $i, "reportid");
$reportid = $adb->query_result($result, $i, "reportid");
$colname = $adb->query_result($result, $i, "columnname");
$column_array = split(":", $colname);
if ($pri_module != "Products") {
$column_array[0] = 'vtiger_crmentityProducts';
$column_array[1] = 'description';
} else {
$column_array[0] = 'vtiger_crmentity';
$column_array[1] = 'description';
}
$newcolname = $column_array[0] . ":" . $column_array[1] . ":" . $column_array[2] . ":" . $column_array[3] . ":" . $column_array[4];
ExecuteQuery("UPDATE {$table} SET columnname = '" . $newcolname . "' WHERE queryid = " . $reportid . " AND columnname = '" . $colname . "'");
}
}
$query = "SELECT vtiger_reportmodules.primarymodule as primarymodule, vtiger_report.reportid as reportid,{$table}.columnname AS columnname FROM vtiger_report INNER JOIN {$table} ON {$table}.queryid = vtiger_report.reportid INNER JOIN vtiger_reportmodules ON vtiger_reportmodules.reportmodulesid = vtiger_report.reportid WHERE {$table}.columnname LIKE 'vtiger_accountPotentials%:accountname:%:account_id:%'";
$result = $adb->query($query);
if ($adb->num_rows($result) > 0) {
for ($i = 0; $i < $adb->num_rows($result); $i++) {
$reportid = $adb->query_result($result, $i, "reportid");
$colname = $adb->query_result($result, $i, "columnname");
$column_array = split(":", $colname);
$column_array[0] = 'vtiger_potential';
$column_array[1] = 'related_to';
$column_array[2] = 'Potentials_Related_To';
$column_array[3] = 'related_to';
$newcolname = $column_array[0] . ":" . $column_array[1] . ":" . $column_array[2] . ":" . $column_array[3] . ":" . $column_array[4];
ExecuteQuery("UPDATE {$table} SET columnname = '" . $newcolname . "' WHERE queryid = " . $reportid . " AND columnname = '" . $colname . "'");
}
}
}
示例9: vt530_changeDataType
function vt530_changeDataType($tableName, $columnName, $fieldName, $dataType, $typeOfData)
{
global $adb;
$query = "UPDATE vtiger_field SET typeofdata='{$typeOfData}' WHERE tablename='{$tableName}' AND fieldname='{$fieldName}'";
ExecuteQuery($query);
$filterSql = 'SELECT cvid, columnname FROM vtiger_cvcolumnlist WHERE columnname LIKE ?';
$params = array("{$tableName}:{$columnName}:{$fieldName}:%:%");
$result = $adb->pquery($filterSql, $params);
$noOfRows = $adb->num_rows($result);
for ($i = 0; $i < $noOfRows; ++$i) {
$cvId = $adb->query_result($result, $i, 'cvid');
$columnName = $adb->query_result($result, $i, 'columnname');
$columnNameParts = explode(':', $columnName);
$length = count($columnNameParts);
$columnNameParts[$length - 1] = $dataType;
$newColumnName = implode(':', $columnNameParts);
ExecuteQuery("UPDATE vtiger_cvcolumnlist SET columnname='{$newColumnName}' WHERE cvid={$cvId} AND columnname='{$columnName}'");
}
$advSql = 'SELECT cvid, columnname FROM vtiger_cvadvfilter WHERE columnname LIKE ?';
$params = array("{$tableName}:{$columnName}:{$fieldName}:%:%");
$result = $adb->pquery($advSql, $params);
$noOfRows = $adb->num_rows($result);
for ($i = 0; $i < $noOfRows; ++$i) {
$cvId = $adb->query_result($result, $i, 'cvid');
$columnName = $adb->query_result($result, $i, 'columnname');
$columnNameParts = explode(':', $columnName);
$length = count($columnNameParts);
$columnNameParts[$length - 1] = $dataType;
$newColumnName = implode(':', $columnNameParts);
ExecuteQuery("UPDATE vtiger_cvadvfilter SET columnname='{$newColumnName}' WHERE cvid={$cvId} AND columnname='{$columnName}'");
}
$reportSql = 'SELECT queryid, columnname FROM vtiger_relcriteria WHERE columnname LIKE ?';
$params = array("%:{$columnName}:%:{$fieldName}:%");
$result = $adb->pquery($reportSql, $params);
$noOfRows = $adb->num_rows($result);
for ($i = 0; $i < $noOfRows; ++$i) {
$queryId = $adb->query_result($result, $i, 'queryid');
$columnName = $adb->query_result($result, $i, 'columnname');
$columnNameParts = explode(':', $columnName);
$length = count($columnNameParts);
$columnNameParts[$length - 1] = $dataType;
$newColumnName = implode(':', $columnNameParts);
ExecuteQuery("UPDATE vtiger_relcriteria SET columnname='{$newColumnName}' WHERE queryid={$queryId} AND columnname='{$columnName}'");
}
$reportSql = 'SELECT reportid, columnname FROM vtiger_reportsortcol WHERE columnname LIKE ?';
$params = array("%:{$columnName}:%:{$fieldName}:%");
$result = $adb->pquery($reportSql, $params);
$noOfRows = $adb->num_rows($result);
for ($i = 0; $i < $noOfRows; ++$i) {
$queryId = $adb->query_result($result, $i, 'reportid');
$columnName = $adb->query_result($result, $i, 'columnname');
$columnNameParts = explode(':', $columnName);
$length = count($columnNameParts);
$columnNameParts[$length - 1] = $dataType;
$newColumnName = implode(':', $columnNameParts);
ExecuteQuery("UPDATE vtiger_reportsortcol SET columnname='{$newColumnName}' WHERE queryid={$queryId} AND columnname='{$columnName}'");
}
$reportSql = 'SELECT queryid, columnname FROM vtiger_selectcolumn WHERE columnname LIKE ?';
$params = array("%:{$columnName}:%:{$fieldName}:%");
$result = $adb->pquery($reportSql, $params);
$noOfRows = $adb->num_rows($result);
for ($i = 0; $i < $noOfRows; ++$i) {
$queryId = $adb->query_result($result, $i, 'queryid');
$columnName = $adb->query_result($result, $i, 'columnname');
$columnNameParts = explode(':', $columnName);
$length = count($columnNameParts);
$columnNameParts[$length - 1] = $dataType;
$newColumnName = implode(':', $columnNameParts);
ExecuteQuery("UPDATE vtiger_selectcolumn SET columnname='{$newColumnName}' WHERE queryid={$queryId} AND columnname='{$columnName}'");
}
}
示例10: LoadCompanies
function LoadCompanies()
{
$users = ExecuteQuery("SELECT\n\t\t\t\t*\n\t\t\tFROM\n\t\t\t\tcompanies\n\t\t\tORDER BY\n\t\t\t\tname");
return $users;
}
示例11: ExecuteQuery
ExecuteQuery("ALTER TABLE vtiger_users2group Type=InnoDB");
ExecuteQuery("ALTER TABLE vtiger_users_last_import Type=InnoDB");
ExecuteQuery("ALTER TABLE vtiger_wordtemplates Type=InnoDB");
ExecuteQuery("ALTER TABLE vtiger_activsubtype Type=InnoDB");
ExecuteQuery("ALTER TABLE vtiger_version Type=InnoDB");
//Added by Asha for tickets #4513
////File Name field size increased into 255 chars in vtiger_attachments table
ExecuteQuery("alter table vtiger_attachments change name name varchar(255)");
////Data type for File Path field changed to TEXT in vtiger_attachments table
ExecuteQuery("alter table vtiger_attachments change path path TEXT");
//Added by bharathi #4657
ExecuteQuery("alter table vtiger_attachments drop index attachments_description_name_type_attachmentsid_idx");
ExecuteQuery("alter table vtiger_attachments add index attachments_description_type_attachmentsid_idx (`description`,`type`,`attachmentsid`)");
//Added by Asha for ticket #4724
ExecuteQuery("update vtiger_selectcolumn set columnname = 'vtiger_campaign:campaignname:Potentials_Campaign_Source:campaignid:V' where columnname = 'vtiger_potential:campaignid:Potentials_Campaign_Source:campaignid:V'");
//Added by bharathi for #4590 on dec 21-2007
ExecuteQuery("alter table vtiger_potential change column amount amount decimal(14,2) default '0.00'");
//Added by Srini for #4684 on dec 21-2007
ExecuteQuery("update vtiger_field set uitype=19 where fieldname='update_log' and tablename='vtiger_troubletickets'");
//In 503 we are using <br> tags for line breaks in Inventory Notification mails. In 504 it is not necessary.
//this code will get the contents from db and then convert all <br> character with \n and again update in db.
$result = $adb->query("select notificationid,notificationbody from vtiger_inventorynotification");
for ($i = 0; $i < $adb->num_rows($result); $i++) {
$body = decode_html($adb->query_result($result, $i, 'notificationbody'));
$body = str_replace('<br>', '\\n', $body);
$notificationid = $adb->query_result($result, $i, 'notificationid');
$adb->pquery("update vtiger_inventorynotification set notificationbody=? where notificationid=?", array($body, $notificationid));
}
//Added by Asha for #4826
ExecuteQuery("update vtiger_pricebook set active=0 where active is null");
$migrationlog->debug("\n\nDB Changes from 5.0.3 to 5.0.4 RC-------- Ends \n\n");
示例12: ExecuteQuery
//Added to rearange the attachment in HelpDesk
ExecuteQuery(" update vtiger_field set block=25,sequence=12 where tabid=13 and fieldname='filename'");
//Query added to as entityname,its tablename,its primarykey are saved in a table
ExecuteQuery(" CREATE TABLE `vtiger_entityname` (\n\t`tabid` int(19) NOT NULL default '0',\n\t`modulename` varchar(50) NOT NULL,\n\t`tablename` varchar(50) NOT NULL,\n\t`fieldname` varchar(150) NOT NULL,\n\t`entityidfield` varchar(150) NOT NULL,\n\tPRIMARY KEY (`tabid`),\n\tKEY `entityname_tabid_idx` (`tabid`)\n)");
//Data Populated for the existing modules
ExecuteQuery("insert into vtiger_entityname values(7,'Leads','vtiger_leaddetails','lastname,firstname','leadid')");
ExecuteQuery("insert into vtiger_entityname values(6,'Accounts','vtiger_account','accountname','accountid')");
ExecuteQuery("insert into vtiger_entityname values(4,'Contacts','vtiger_contactdetails','lastname,firstname','contactid')");
ExecuteQuery("insert into vtiger_entityname values(2,'Potentials','vtiger_potential','potentialname','potentialid')");
ExecuteQuery("insert into vtiger_entityname values(8,'Notes','vtiger_notes','title','notesid')");
ExecuteQuery("insert into vtiger_entityname values(13,'HelpDesk','vtiger_troubletickets','title','ticketid')");
ExecuteQuery("insert into vtiger_entityname values(9,'Calendar','vtiger_activity','subject','activityid')");
ExecuteQuery("insert into vtiger_entityname values(10,'Emails','vtiger_activity','subject','activityid')");
ExecuteQuery("insert into vtiger_entityname values(14,'Products','vtiger_products','productname','productid')");
ExecuteQuery("insert into vtiger_entityname values(29,'Users','vtiger_users','last_name,first_name','id')");
ExecuteQuery("insert into vtiger_entityname values(23,'Invoice','vtiger_invoice','subject','invoiceid')");
ExecuteQuery("insert into vtiger_entityname values(20,'Quotes','vtiger_quotes','subject','quoteid')");
ExecuteQuery("insert into vtiger_entityname values(21,'PurchaseOrder','vtiger_purchaseorder','subject','purchaseorderid')");
ExecuteQuery("insert into vtiger_entityname values(22,'SalesOrder','vtiger_salesorder','subject','salesorderid')");
ExecuteQuery("insert into vtiger_entityname values(18,'Vendors','vtiger_vendor','vendorname','vendorid')");
ExecuteQuery("insert into vtiger_entityname values(19,'PriceBooks','vtiger_pricebook','bookname','pricebookid')");
ExecuteQuery("insert into vtiger_entityname values(26,'Campaigns','vtiger_campaign','campaignname','campaignid')");
ExecuteQuery("insert into vtiger_entityname values(15,'Faq','vtiger_faq','question','id')");
//added quantity in stock in product default listview - All
$res = $adb->query("select vtiger_cvcolumnlist.cvid from vtiger_cvcolumnlist inner join vtiger_customview on vtiger_cvcolumnlist.cvid=vtiger_customview.cvid where entitytype='Products' and viewname='All'");
if ($adb->num_rows != 0) {
$cvid = $adb->query_result($res, 0, 'cvid');
$adb->query("insert into vtiger_cvcolumnlist values({$cvid},5,'vtiger_products:qtyinstock:qtyinstock:Products_Quantity_In_Stock:V')");
}
//echo "<br><font color='red'> 5.0/5.0.1 ==> 5.0.2 Database changes has been done.</font><br>";
$migrationlog->debug("\n\nDB Changes from 5.0.1 to 5.0.2 -------- Ends \n\n");
示例13: ExecuteQuery
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
//5.1.0 RC to 5.1.0 database changes
//we have to use the current object (stored in PatchApply.php) to execute the queries
$adb = $_SESSION['adodb_current_object'];
$conn = $_SESSION['adodb_current_object'];
$migrationlog->debug("\n\nDB Changes from 5.1.0 RC to 5.1.0 -------- Starts \n\n");
ExecuteQuery("DELETE vtiger_cvcolumnlist FROM vtiger_cvcolumnlist INNER JOIN vtiger_customview WHERE vtiger_cvcolumnlist.columnname LIKE '%vtiger_notes:filename%' AND vtiger_customview.cvid = vtiger_cvcolumnlist.cvid AND vtiger_customview.entitytype='HelpDesk'");
ExecuteQuery("DELETE vtiger_cvcolumnlist FROM vtiger_cvcolumnlist INNER JOIN vtiger_customview WHERE (vtiger_cvcolumnlist.columnname LIKE '%parent_id%' OR vtiger_cvcolumnlist.columnname LIKE '%vtiger_contactdetails%') AND vtiger_customview.cvid = vtiger_cvcolumnlist.cvid AND vtiger_customview.entitytype='Documents'");
ExecuteQuery("DELETE vtiger_cvadvfilter FROM vtiger_cvadvfilter INNER JOIN vtiger_customview WHERE vtiger_cvadvfilter.columnname LIKE '%vtiger_notes:filename%' AND vtiger_customview.cvid = vtiger_cvadvfilter.cvid AND vtiger_customview.entitytype='HelpDesk'");
ExecuteQuery("DELETE vtiger_cvadvfilter FROM vtiger_cvadvfilter INNER JOIN vtiger_customview WHERE (vtiger_cvadvfilter.columnname LIKE '%parent_id%' OR vtiger_cvadvfilter.columnname LIKE '%vtiger_contactdetails%') AND vtiger_customview.cvid = vtiger_cvadvfilter.cvid AND vtiger_customview.entitytype='Documents'");
// Fixed issue with Calendar duration calculation
ExecuteQuery("ALTER TABLE vtiger_activity MODIFY duration_hours VARCHAR(200)");
$result = $adb->query("SELECT activityid,date_start,due_date, time_start,time_end FROM vtiger_activity WHERE activitytype NOT IN ('Task','Emails')");
$noofrows = $adb->num_rows($result);
for ($index = 0; $index < $noofrows; $index++) {
$activityid = $adb->query_result($result, $index, 'activityid');
$date_start = $adb->query_result($result, $index, 'date_start');
$time_start = $adb->query_result($result, $index, 'time_start');
$due_date = $adb->query_result($result, $index, 'due_date');
$time_end = $adb->query_result($result, $index, 'time_end');
$start_date = split("-", $date_start);
$end_date = split("-", $due_date);
$start_time = split(":", $time_start);
$end_time = split(":", $time_end);
$start = mktime(intval($start_time[0]), intval($start_time[1]), 0, intval($start_date[1]), intval($start_date[2]), intval($start_date[0]));
$end = mktime(intval($end_time[0]), intval($end_time[1]), 0, intval($end_date[1]), intval($end_date[2]), intval($end_date[0]));
$duration_in_minutes = floor(($end - $start) / 60);
示例14: ExecuteQuery
require "checkUser.php";
$id = $_GET["id"];
?>
<a href="question.php?stid=<?php
echo $id;
?>
">Ask Question<img src="res/images/askq.jpg" class='imagedel'/></a>
<hr />
<?php
$str = "SELECT * FROM question, user WHERE question.user_id=user.user_id and subtopic_id={$id}";
$result = ExecuteQuery($str);
$no_rows = mysql_num_rows($result);
if ($no_rows > 0) {
while ($row = mysql_fetch_array($result)) {
$rowsc = ExecuteQuery("SELECT count(*) as counter from answer where question_id={$row['question_id']}");
$rowc = mysql_fetch_array($rowsc);
$count = $rowc['counter'];
echo "<h4>";
echo "<span class='box2'>";
echo "<span class='head'><a href='questionview.php?qid={$row['question_id']}' >{$row['heading']}</a> </span>";
echo "</span>";
echo "</h4>";
echo "{$row['question_detail']} <span class='view2'>Views : {$row['views']}, Replies :{$count}</span>";
echo "<br/><br/>";
echo "Asked by<br/>{$row['fullname']}";
echo "<br/><div class='line'></div>";
//echo "<a href='answer.php?qid=$row[question_id]' class='reply'>REPLY</a>";
}
} else {
echo "No questions at the moment";
示例15: ExecuteQuery
<?php
require "header.php";
?>
<?php
$result = ExecuteQuery("SELECT * FROM User");
echo "<table border='1'>";
echo "<strong><tr><th>firstname</th><th>fullname</th><th>password</th><th>e_mail</th><th>gender</th><th>dob</th></tr></strong>";
while ($name_row = mysql_fetch_row($result)) {
echo "<tr>";
print "<td>{$name_row[0]}</td><td>{$name_row[1]}</td><td>{$name_row[2]}</td><td>{$name_row[3]}</td><td>{$name_row[4]}</td><td>{$name_row[5]}</td><br />";
echo "</tr>";
}
require "footer.php";