本文整理汇总了PHP中FC_SQL::query方法的典型用法代码示例。如果您正苦于以下问题:PHP FC_SQL::query方法的具体用法?PHP FC_SQL::query怎么用?PHP FC_SQL::query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FC_SQL
的用法示例。
在下文中一共展示了FC_SQL::query方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_dyn_content
function get_dyn_content($id)
{
$SQL = new FC_SQL();
$qs = "SELECT content FROM anima09_page p\n\t\t\t\tLEFT JOIN anima09_page_content c \n\t\t\t\t\tON p.anima09_page_id = c.anima09_page_id\n\t \t\t\tWHERE p.anima09_page_id = {$id}";
$SQL->query($qs);
$SQL->next_record();
return $SQL->f(0);
}
示例2:
"
onClick="closehelp();">
Return To Central Maintenance Page</a><br>
</td></tr>
<tr><td align=center colspan=2 bgcolor="#FFFFFF">
<b>
Modify A Vendor Profile<br>
</b>
</td></tr>
<tr><td colspan=2 bgcolor="#FFFFFF">
<?php
$fcv->query("select * from vend where vendzid={$vendid}");
$fcv->next_record();
?>
<form method="post" action="vendorupd.php">
<input type=hidden name=act value=update>
<input type=hidden name=vendid value="<?php
echo $vendid;
?>
">
<input type=hidden name=zoneid value="<?php
echo $zoneid;
?>
">
示例3: parse_sql_file
function parse_sql_file($filename)
{
// do not escape the file while reading it
set_magic_quotes_runtime(0);
$fcz = new FC_SQL();
$fcz->connect();
if (file_exists($filename)) {
$fp = fopen($filename, "r");
while ($buffer = fgets($fp, 4096)) {
$dres = null;
$res = null;
if (strchr($buffer, '#') && eregi("\"#[0-9a-z]{6}\"", $buffer)) {
// html color code, typically in inserted html
$sql .= $buffer;
} else {
if (ereg("(^[ \t]*[#;/-]+)", $buffer, $res) || ereg("^\n", $buffer)) {
// comment line, skip it
// oracle has lines with a single leading /, skip them
continue;
} elseif (ereg("([^#]+);[\t ]*[-]{0,2}.*", $buffer, $res)) {
// ; terminated sql line
// chop off double dash comments
$sql .= $res[1];
// echo "second: $sql<br>br>\n";
if (ereg(" end[ \t]*\$", $res[1])) {
// wierd hack for oracle triggers/procedures
$sql .= ';';
}
$fcz->query($sql);
unset($sql);
} elseif (ereg("(^[^#;]+)[\t ]*[-]{0,2}[^;]*", $buffer, $res)) {
// unterminated sql line
// chop off double dash comments
$sql .= $res[1];
// echo "first: $sql<br><br>\n";
} else {
// echo "third: $buffer<br><br>\n";
}
}
}
fclose($fp);
}
}
示例4: count
// how many cats across the page?
$subcats1 = new FC_SQL();
$subcats1->query('select count(*) as cnt from cat ' . "where catzid={$zid} and catlid={$lid} and catunder={$cat}");
// are there any subcats to display? If not, don't do anything more.
$subcats1->next_record();
$subcattot = (int) $subcats1->f("cnt");
$subcats1->free_result();
} else {
$subcattot = 0;
}
if ($subcattot) {
// change this to increase or descrease the number of cats
// displayed across the page
$cats_across = "1";
$subcats = new FC_SQL();
$subcats->query("select catval,catdescr,catmast,catlogo from cat " . "where catact=1 and catzid={$zid} and catlid={$lid} and catunder={$cat} order by catdescr");
$across = 0;
?>
<br /><br />
<table border="0" width="500" cellpadding="5">
<tr><td valign="top" colspan="<?php
echo $cats_across;
?>
">
<b><?php
echo fc_text("subcats");
?>
</b>
</td></tr>
<?php
while ($subcats->next_record()) {
示例5: getparam
$act = getparam('act');
$oldzid = (int) getparam('oldzid');
// ========== end of variable loading ==========
require './admin.php';
require './header.php';
$droot = "BITCART_PKG_PATH";
if ($zoneid == 0) {
?>
Please click the "Back" button on your browser
and select a default zone. Thank you.
<?php
exit;
}
$fcm = new FC_SQL();
$fcm->Auto_commit = 0;
$fcm->query("select count(*) as cnt from master");
$fcm->next_record();
if ($fcm->f("cnt") > 0) {
$fcm->free_result();
$res = $fcm->query("update master set zoneid={$zoneid}");
} else {
$res = $fcm->query("insert into master (zoneid) values ({$zoneid})");
}
if (!$res) {
$fcm->rollback();
echo "<b>Failure updating master: {$res}</b><br>\n";
} else {
$fcm->commit();
echo "Work Committed.<br>\n";
}
?>
示例6: count
<b>Delete An Existing Language Profile</b>
</td></tr>
<tr><td align=center bgcolor=#ffffff>
<form name=langmod method="post" action="langmod.php">
To modify an existing language profile,<br>
select its name from the list and<br>
click <i>Modify Selected Profile</i>.
<br>
<?php
$fcl = new FC_SQL();
$fcl->query("select count(*) as cnt from lang " . "where langzid={$zoneid} and langid={$langid}");
$fcl->next_record();
$len = $fcl->f("cnt");
$fcl->free_result();
?>
<select name=lngid size="<?php
echo $len + 1;
?>
"
onChange="document.langmod.action='langmod.php';submit();">
<option value="" selected>[no change]
<?php
$fcl->query("select * from lang " . "where langzid={$zoneid} and langid={$langid} order by langid");
while ($fcl->next_record()) {
示例7: count
>
<input type=hidden name=show value="<?php
echo $show;
?>
">
<input type=hidden name=oldsku value="">
Default Zone:<br>
</td>
</tr>
<tr><td valign=top align=center bgcolor=#ffffff>
<?php
$currz = $fcm->f("zoneid");
$fcz->query("select count(*) as cnt from zone");
$fcz->next_record();
$zt = (int) $fcz->f('cnt');
$fcz->free_result();
$fcz->query("select zoneid,zonedescr from zone order by zoneid");
?>
<select name=zoneid size="<?php
echo $zt + 1;
?>
" onFocus="currfield='zoneid';">
<option value="">[select a zone]
<?php
while ($fcz->next_record()) {
$zid = $fcz->f("zoneid");
if ($currz == $zid) {
echo "<option value=\"{$zid}\" selected>";
示例8: getparam
$zoneid = (int) getparam('zoneid');
$langid = (int) getparam('langid');
// ========== end of variable loading ==========
$fcl = new FC_SQL();
$fcp = new FC_SQL();
if (!$zoneid || !$langid) {
echo 'Please click Back and select a zone and/or language. Thank you.';
exit;
}
?>
<h2 align="center">Related Product Maintenance</h2>
<hr />
<?php
$fcp->query("select count(*) as cnt from prodrel where relzone={$zoneid}");
$fcp->next_record();
$pt = $fcp->f('cnt');
$fcp->free_result();
?>
<center>
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#666666" width="650" class="text">
<tr><td colspan="2" align="center" valign="middle" bgcolor="#ffffff">
<a href="index.php?zoneid=<?php
echo $zoneid;
?>
&langid=<?php
echo $langid;
?>
示例9:
$ototal = (int) $ototal;
$notfound = 0;
if ($ototal) {
$fcohead->query("select * from ohead where orderid='{$orderid}'");
if (!$fcohead->next_record()) {
$notfound = 1;
}
} else {
$notfound = 1;
}
if ($notfound) {
echo '<tr><td align=center valign=middle colspan=4 bgcolor="#FFFFFF">' . 'Order record ' . $orderid . ' not found<br>' . '</td></tr>';
} else {
// notfound
$purchid = $fcohead->f("purchid");
$fccust->query("select * from cust where custid={$purchid}");
if (!$fccust->next_record()) {
echo '<tr><td align=center valign=middle colspan=4 bgcolor="#FFFFFF">' . 'Customer record ' . $purchid . ' not found<p>' . "</td></tr>\n";
} else {
// show the customer record
echo "<tr><td valign=top colspan=2 bgcolor=\"#FFFFFF\"><b>Billing Information</b><p>\n";
echo $fccust->f("custbsal") . ' ' . $fccust->f("custbfname") . ' ' . $fccust->f("custbmname") . ' ' . $fccust->f("custblname") . "<br>\n" . $fccust->f("custbaddr1") . "<br>\n" . $fccust->f("custbaddr2") . "<br>\n" . $fccust->f("custbcity") . ', ' . $fccust->f("custbstate") . ' ' . $fccust->f("custbzip") . '-' . $fccust->f("custbzip4") . ' ' . $fccust->f("custbnatl") . "<br>\n" . $fccust->f("custbacode") . ' ' . $fccust->f("custbphone") . "<br>\n" . $fccust->f("custbemail") . "<br>\n";
echo "</td><td valign=top colspan=2 bgcolor=\"#FFFFFF\"><b>Shipping Information</b><p>\n";
echo $fccust->f("custssal") . ' ' . $fccust->f("custsfname") . ' ' . $fccust->f("custsmname") . ' ' . $fccust->f("custslname") . "<br>\n" . $fccust->f("custsaddr1") . "<br>\n" . $fccust->f("custsaddr2") . "<br>\n" . $fccust->f("custscity") . ', ' . $fccust->f("custsstate") . ' ' . $fccust->f("custszip") . '-' . $fccust->f("custszip4") . ' ' . $fccust->f("custsnatl") . "<br>\n" . $fccust->f("custsacode") . ' ' . $fccust->f("custsphone") . "<br>\n" . $fccust->f("custsemail") . "<br>\n";
echo "<tr><td valign=top colspan=2 bgcolor=\"#FFFFFF\"><b>IP Address:</b>\n";
echo "</td><td valign=top colspan=2 bgcolor=\"#FFFFFF\">" . $fcohead->f('oheadcustip') . "\n";
echo "</td></tr>\n";
echo "</td></tr>\n";
echo "<tr><td valign=top colspan=4 align=center bgcolor=\"#FFFFFF\"><b>Credit Information</b></td></tr>\n";
echo "<tr><td valign=top colspan=2 bgcolor=\"#FFFFFF\">\n";
echo '<b>CC Name</b><br>' . '<b>CC Number</b><br>' . '<b>CC Type</b><br>' . '<b>CC Expiration</b><br>';
示例10: time
$fcl = new FC_SQL();
// language
$fcp = new FC_SQL();
// check if product exists
$fcu = new FC_SQL();
// update product
$fcw = new FC_SQL();
// web
//$fcc = new FC_SQL; // :VESTIGIAL?: mag 030704 I don't see this used anywhere.
$fcz = new FC_SQL();
// zone
$now = time();
$droot = 'BITCART_PKG_PATH';
// figure out from the addzone* fields which zones must be processed
// accumulate a numeric indexed array $zins
$fcz->query("select zoneid from zone order by zoneid");
while ($fcz->next_record()) {
$zid = (int) $fcz->f('zoneid');
$tzid = (int) getparam('addzone' . $zid);
//$tzid : this zone id, get the value of this zone flag
if ($tzid) {
// if this box was checked
$zins[] = $zid;
// process this zone (add this zone to array of zones to process)
}
}
$z = 0;
while ($zins[$z]) {
// process all selected zones
$zid = $zins[$z];
$proderr = 0;
示例11:
if there is an option in the current language defined it is
inserted into prodlflag1
(bvo)
*/
$fcco = new FC_SQL();
$fcco->query("select * from prodopt where poptzid={$zoneid} and poptlid={$langid}" . " and poptsku='{$ssku}'");
if ($fcco->next_record()) {
$poptf = 1;
}
$fcco->free_result();
$plflag1 = 0;
if ($poptf) {
$plflag1 |= (int) $flag_hasoption;
}
$fccr = new FC_SQL();
$fccr->query("update prodlang set prodlflag1={$plflag1} where prodlsku='{$ssku}'" . " and prodlzid={$zoneid} and prodlid={$langid}");
$fccr->commit();
//set the prodlflag correctly bvo
?>
<p>
<?php
if ($act == 'update' || $act == 'delete') {
?>
<form method=post action="prodoptndx.php">
<?php
} else {
?>
<form method=post action="productmod.php">
<?php
示例12: getparam
require_once '../bit_setup_inc.php';
require './functions.php';
require './public.php';
require './languages.php';
$esdid = (int) getparam('esdid');
if ($esdid == 0) {
echo fc_text('esdnotrans');
echo fc_text('esdcustsvc');
exit;
}
require './pwesd.php';
$now = time();
// increment the download count
$fcesd = new FC_SQL();
$fcesd->query("select esddlcnt,esddlmax,esddlexp,esddlfile from esd " . "where esdid={$esdid} and esdoid='{$pwuid}'");
if (!$fcesd->next_record()) {
echo fc_text('esdnodl');
echo fc_text('esdcustsvc');
exit;
}
$esddlcnt = (int) $fcesd->f('esddlcnt') + 1;
$esddlmax = (int) $fcesd->f('esddlmax');
$esddlexp = (int) $fcesd->f('esddlexp');
$esddlfile = $fcesd->f('esddlfile');
$fcesd->free_result();
if ($esddlcnt > $esddlmax || $now > $esddlexp) {
echo fc_text('esddlmax');
echo fc_text('esdcustsvc');
exit;
}
示例13: getparam
// be eliminated.
$zoneid = (int) getparam('zoneid');
$langid = (int) getparam('langid');
// ========== end of variable loading ==========
require './admin.php';
require './header.php';
if (!$zoneid || !$langid) {
?>
A zone or language ID was not selected.
<p>Please click the <a href='self.history.back()'>Back</a> button on your browser
and select a zone. Thank you.
<?php
exit;
}
$fcp = new FC_SQL();
$fcp->query("select zonedescr from zone where zoneid='{$zoneid}' and zonedeflid='{$langid}'");
if ($fcp->next_record()) {
$zone_name = $fcp->f("zonedescr") . "<br>";
$fcp->free_result();
}
?>
<table align=center cellspacing=0 cellpadding=4 bgcolor=#666666 width=650 class="text">
<tr valign="middle" align="center">
<td bgcolor=#ffffff>
<h2>FishCart Reporting Module</h2>
</td>
</tr>
</table>
<hr>
<table align=center class="text">
示例14: mktime
&langid=<?php
echo $langid;
?>
"
onClick="closehelp();">Return to Password Maintenance Page</a><br>
<p>
<?php
exit;
}
}
if ($action == "A" || $action == "M") {
if ($yy && $mm && $dd) {
$pwexpdate = mktime(0, 0, 0, $mm, $dd, $yy);
} else {
$pwexpdate = 0;
}
}
if ($action == "A") {
$fcpw->query("insert into pw " . "(pwdescr,pwemail,pwuid,pwpw," . "pwjan,pwfeb,pwmar,pwapr,pwmay,pwjun," . "pwjul,pwaug,pwsep,pwoct,pwnov,pwdec," . "pwexp,pwactive,pwzone) " . "values (" . "'{$pwdescr}','{$pwemail}','{$pwuid}','{$pwpw}'," . "0,0,0,0,0,0,0,0,0,0,0,0," . "{$pwexpdate},{$pwactive},{$pwzone})");
} elseif ($action == "M") {
$fcpw->query("update pw set " . "pwdescr='{$pwdescr}',pwemail='{$pwemail}',pwuid='{$pwuid}',pwpw='{$pwpw}'," . "pwjan={$pwjan},pwfeb={$pwfeb},pwmar={$pwmar}," . "pwapr={$pwapr},pwmay={$pwmay},pwjun={$pwjun}," . "pwjul={$pwjul},pwaug={$pwaug},pwsep={$pwsep}," . "pwoct={$pwoct},pwnov={$pwnov},pwdec={$pwdec}," . "pwexp={$pwexpdate},pwactive={$pwactive},pwzone={$pwzone} " . "where pwuid='{$oldpwuid}'");
} elseif ($action == "D") {
$send_pw = 0;
$fcpw->query("delete from pw where pwuid='{$pwuid}'");
}
global $gBitSystem;
// send password notice only if the user is active
if ($send_pw && $pwactive) {
mail("{$pwemail}", " Catalog User Password Update", "\n" . "Your new catalog username and password are below.\n\n" . " username: {$pwuid}\n" . " password: {$pwpw}\n", "From: " . $gBitSystem->getPreference('sender_email'));
}
header("Location: {$nsecurl}/{$maintdir}/pwndx.php?zoneid={$zoneid}&langid={$langid}");
示例15: elseif
require './admin.php';
require './header.php';
$fcc = new FC_SQL();
if ($act == "add") {
if (strlen($title) == 0 || strlen($text) == 0) {
?>
<p>One of the fields was left blank. Both fields must be filled
in to have a functioning link.<p>Please click the
"Back" button on your browser and correct the
errors. Thank you.</p>
<?php
exit;
}
$max_seq = new FC_SQL();
if ($databaseeng == 'odbc' && $dialect == 'solid') {
$max_seq->query("select seq from auxtext where rownum < 2 order by seq desc");
} elseif ($databaseeng == 'postgres') {
$max_seq->query("select seq from auxtext order by seq desc limit 1,0");
} elseif ($databaseeng == 'mssql') {
$max_seq->query("select top 1 seq from auxtext order by seq desc");
} elseif ($databaseeng == 'oracle') {
$max_seq->query("select seq from auxtext where rownum < 2 order by seq desc");
} elseif ($databaseeng == 'mysql') {
$max_seq->query("select seq from auxtext order by seq desc limit 0,1");
}
$max_seq->next_record();
$seq = $max_seq->f("seq") + 1;
$max_seq->free_result();
$res = $fcc->query("insert into auxtext (" . "seq,loc,title,text) values ({$seq},{$loc},'{$title}','{$text}')");
} elseif ($act == "mod") {
$res = $fcc->query("update auxtext " . "set loc={$loc},title='{$title}', text='{$text}' where rid='{$rid}'");