本文整理汇总了PHP中FC_SQL::free_result方法的典型用法代码示例。如果您正苦于以下问题:PHP FC_SQL::free_result方法的具体用法?PHP FC_SQL::free_result怎么用?PHP FC_SQL::free_result使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FC_SQL
的用法示例。
在下文中一共展示了FC_SQL::free_result方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stripslashes
do {
// already have the first record
$sku = $pre8->f("sku");
$csku = $pre8->f("compsku");
$qty = $pre8->f("qty");
$invover = (int) $pre8->f("invover");
$olzone = (int) $pre8->f("olzone");
$ollang = (int) $pre8->f("ollang");
// get the short product description
$pre10->query("select prodname from prodlang " . "where prodlzid={$olzone} and prodlid={$ollang} and prodlsku='{$sku}'");
if (!$pre10->next_record()) {
$pre11->query("delete from oline where orderid='{$cartid}'");
continue;
}
$sdescr = stripslashes(ereg_replace("<[^>]+>", " ", $pre10->f("prodname")));
$pre10->free_result();
$pre10->query("select prodprice,prodsetup,prodweight,prodflag1 from prod " . "where prodzid={$olzone} and prodsku='{$sku}'");
if (!$pre10->next_record()) {
$pre11->query("delete from oline where orderid='{$cartid}'");
continue;
}
$prodprice = (double) $pre10->f("prodprice");
$prodsetup = (double) $pre10->f("prodsetup");
$prodweight = (double) $pre10->f("prodweight");
$flag1 = (int) $pre10->f("prodflag1");
$pre10->free_result();
?>
<tr><td class="previewcell" colspan="2" align="left" valign="top" bgcolor="#FFFFFF">
<font face="Arial,Helvetica" size="1">
<?php
示例2:
$cybercash->ccstate = "{$billing_state}";
$cybercash->cczip = "{$billing_zip}";
$cybercash->cccountry = "USA";
// submit the charge to CyberCash and parse out the return data
if (!$cybercash->send()) {
$cybercash->errorHandler("Error: no data received back from CyberCash");
}
$POP = $cybercash->POP;
parse_str(ereg_replace("pop.", "", $POP));
if ($status != 'success') {
// get the Web table
$fcw = new FC_SQL();
$fcw->query("select webback,webtext,weblink,webvlink,webalink,webbg,webfree,websort " . "from fishcart where webzid={$zid} and weblid={$lid}");
$fcw->next_record();
$srt = $fcw->f("websort");
$fcw->free_result();
// END OF ESSENTIAL CART DISPLAY CODE FROM LINE 1 TO HERE
?>
<html>
<head>
<link rel="stylesheet" ID href="style.css" type="text/css" />
<title>
</title>
</head>
<body<?php
if ($fcw->f("webback")) {
?>
background="<?php
echo $fcw->f("webback");
示例3: show_countries
function show_countries($zid, $lid, $matchiso, $lang_iso)
{
$ret = NULL;
$fct = new FC_SQL();
$fct->query("select ctrylangciso,ctrylangname from country,countrylang " . "where ctryzid={$zid} and ctrylid={$lid} and ctryactive=1 and " . "ctryiso=ctrylangciso and ctrylangliso='{$lang_iso}' order by ctryseq,ctrylangname");
while ($fct->next_record()) {
$iso = $fct->f('ctrylangciso');
$name = $fct->f('ctrylangname');
if ($matchiso == $iso) {
$chk = ' selected';
} else {
$chk = '';
}
$ret .= "<option value=\"{$iso}\"{$chk}>{$name}</option>\n";
}
$fct->free_result();
return $ret;
}
示例4: count
?>
">
<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>";
$oldzid = $zid;
} else {
echo "<option value=\"{$zid}\">";
示例5: mktime
$sdate = mktime(0, 0, 0, $nsm, $nsd, $nsy);
$ndate = mktime(0, 0, 0, $nem, $ned, $ney);
} else {
$sdate = 0;
$ndate = 0;
}
}
$fco = new FC_SQL();
$fcu = new FC_SQL();
if ($act == "insert") {
$fcu->query("select count(*) as cnt from oprod where oprodsku='{$sku}'");
$fcu->next_record();
if ($fcu->f('cnt') == 0) {
$fco->query("insert into oprod (oprodsku,ostart,oend,ozid) " . "values ('{$sku}',{$sdate},{$ndate},{$zoneid})");
}
$fcu->free_result();
} elseif ($act == "update") {
$fco->query("update oprod " . "set oprodsku='{$sku}',ostart={$sdate},oend={$ndate} where oprodsku='{$sku}'");
} elseif ($act == "delete") {
$fco->query("delete from oprod where oprodsku='{$sku}'");
}
$fco->commit();
?>
<p>
The <?php
echo $act;
?>
action is complete.
示例6: elseif
<?php
exit;
}
$fcl = new FC_SQL();
$fcm = new FC_SQL();
$fct = new FC_SQL();
$fcta = new FC_SQL();
$fctb = new FC_SQL();
$fctc = new FC_SQL();
if ($act == "update") {
//get the old langfppromo
$fcta->query("select langfppromo from lang where langid={$lngid} and " . "langzid={$zoneid}");
if ($fcta->next_record()) {
$oldfppromo = (int) $fcta->f('langfppromo');
}
$fcta->free_result();
// oracle clob
if ($databaseeng == "oracle") {
$res = $fcl->query("update lang set " . "langzid={$langzid}, langdescr='{$langdescr}',langtmpl='{$langtmpl}', " . "langtdsp='{$langtdsp}', langterr='{$langterr}', langshow='{$langshow}', " . "langgeo='{$langgeo}', langordr='{$langordr}', langfinl='{$langfinl}', " . "langproc='{$langproc}', langstmpl='{$langstmpl}',langiso ='{$langiso}', " . "langwelcome='{$langwelcome}',langcopy='{$langcopy}',langterms=empty_clob()," . "langfppromo={$langfppromo} " . "where langid={$lngid}", langterms, $langterms);
} else {
$res = $fcl->query("update lang set " . "langzid={$langzid}, langdescr='{$langdescr}',langtmpl='{$langtmpl}', " . "langtdsp='{$langtdsp}', langterr='{$langterr}', langshow='{$langshow}', " . "langgeo='{$langgeo}', langordr='{$langordr}', langfinl='{$langfinl}', " . "langproc='{$langproc}', langstmpl='{$langstmpl}',langiso ='{$langiso}', " . "langwelcome='{$langwelcome}',langcopy='{$langcopy}',langterms='{$langterms}'," . "langfppromo={$langfppromo} " . "where langid={$lngid}");
}
} elseif ($act == "new") {
$fcm->query('select numlang from master');
$fcm->next_record();
$numl = (int) $fcm->f('numlang');
$fcm->free_result();
$numl += 1;
$fcm->query("update master set numlang={$numl}");
// oracle clob
if ($databaseeng == "oracle") {
示例7: count
$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;
?>
"
onclick="closehelp()">
Return To Central Maintenance Page</a><br />
示例8:
$get_subz = new FC_SQL();
$get_subz->query("select subzsid,subzdescr from subzone " . "where subzid={$zoneid} order by subzdescr");
while ($get_subz->next_record()) {
$pszid = (int) $get_subz->f('subzsid');
if ($pszid == $currsubzparent) {
$chk = ' selected';
} else {
$chk = '';
}
if ($pszid != $subzsid) {
// don't show our own to prevent self-reference
$pszidd = $get_subz->f('subzdescr');
print "<option value=\"{$pszid}\"{$chk}>{$pszidd}</option>\n";
}
}
$get_subz->free_result();
?>
</select><br />
</td></tr>
<tr><td valign="top" align="center" bgcolor="#FFFFFF" width="50%">
SubZone Vendor ID:<br />
<select name="subzvendid" size="1">
<?php
$fcz->query("select vendname from vend where vendid={$subzvendid}");
$fcz->next_record();
echo '<option value="' . $subzvendid . '" selected="selected">' . $fcz->f('vendname') . '</option>';
$fcv->query("select vendid,vendname from vend where vendzid={$zoneid} and vendid!={$subzvendid}");
while ($fcv->next_record()) {
?>
示例9: count
if ($showall) {
if ($databaseeng == 'odbc' && $dialect == 'solid') {
$fccc->query("select count(*) as cnt from _ccnum");
} else {
$fccc->query("select count(*) as cnt from {$instid}_ccnums");
}
} else {
if ($databaseeng == 'odbc' && $dialect == 'solid') {
$fccc->query("select count(*) as cnt from _ccnum where fetched='0'");
} else {
$fccc->query("select count(*) as cnt from {$instid}_ccnums " . "where fetched='0'");
}
}
$fccc->next_record();
$cnt = $fccc->f("cnt");
$fccc->free_result();
if ($databaseeng == 'odbc' && $dialect == 'solid') {
$fccc->query("select count(*) as cnt from _ccnum");
} else {
$fccc->query("select count(*) as cnt from {$instid}_ccnums");
}
$fccc->next_record();
$tot = $fccc->f("cnt");
$fccc->free_result();
?>
<?php
if ($cnt) {
?>
<tr><td align=center colspan=4 bgcolor=#ffffff>
<?php
示例10: date
$oh->query("select orderid,tstamp from ohead");
$tprod = 0;
while ($oh->next_record()) {
$ts = $oh->f("tstamp");
$oi = $oh->f("orderid");
$ds = (int) date("d", $ts);
$ol->query("select * from oline where orderid='{$oi}'");
$j = 0;
while ($ol->next_record()) {
if (!$j) {
echo "\ncustid:{$oi} date: {$ds}\n";
$tord++;
}
$qt = (int) $ol->f("qty");
$sk = $ol->f("sku");
$op->query("select prodprice from prod where prodsku='{$sk}'");
if ($op->next_record()) {
$prc = (double) $op->f("prodprice");
} else {
$prc = 0;
}
$op->free_result();
$ltot = $prc * $qt;
$tamt += (double) $ltot;
echo " sku:{$sk} qty: {$qt} price: {$prc} ltot: {$ltot}\n";
$tprod++;
$j++;
}
$ol->free_result();
}
echo "\ntotal orders: {$tord} total products: {$tprod} pending: {$tamt}\n";
示例11: Array
<?php
exit;
}
$fcp = new FC_SQL();
$fcg = new FC_SQL();
$fcp->query("select * from prodopt where poptid={$poptid} and " . "poptlid={$langid} and poptzid={$zoneid}");
$fcp->next_record();
// create a javascript array of prodopt group names
echo "<script>\nvar jspoptgrp = new Array();\n";
$fcg->query("select pgrpgrp,pgrpname from prodoptgrp " . "where pgrpzid={$zoneid} and pgrplid={$langid} order by pgrpgrp");
while ($fcg->next_record()) {
$pgrpgrp = (int) $fcg->f('pgrpgrp');
$pgrpname = $fcg->f('pgrpname');
echo "jspoptgrp[\"{$pgrpgrp}\"] = \"{$pgrpname}\";\n";
}
$fcg->free_result();
echo "</script>\n";
?>
<h2 align=center>Modify A Product Option</h2>
<hr>
<center>
<table border="0" cellpadding="3" cellspacing="1" bgcolor="#666666" width="650" class="text">
<tr><td align=center colspan=2 bgcolor="#FFFFFF">
<a href="index.php?zoneid=<?php
echo $zoneid;
?>
&langid=<?php
echo $langid;
示例12: stripslashes
<option value="0">[top level category]
<?php
while ($fct->next_record()) {
$catval = (int) $fct->f("catval");
if ($catval == $cat) {
continue;
// don't show this cat to avoid self reference
}
if ($catval == $catunder) {
echo "<option value=\"{$catval}\" selected>";
} else {
echo "<option value=\"{$catval}\">";
}
echo stripslashes(substr($fct->f("catdescr"), 0, 30) . "\n");
}
$fct->free_result();
?>
</select><br />
Category Description:
<i>80 characters max</i><br />
<input name="descr" size="40" maxsize="80"
value="<?php
echo stripslashes($fcc->f("catdescr"));
?>
"
onFocus="currfield='catdescr'" /><br />
Category Masthead Text:
<i>as long as desired</i><br />
<textarea name="catmast" wrap="virtual" rows="12" cols="60"
示例13:
}
// SQL INJECTION AVOIDENCE
$zid = (int) $zid;
$lid = (int) $lid;
$purchid = (int) $purchid;
$orderproc_flag = !empty($orderproc_flag) ? (int) $orderproc_flag : 0;
// remove anything but a-z, A-Z, 0-9 and _
$cartid = eregi_replace('[^a-z0-9_]', '', $cartid);
//uncomment below if ciso ever used, keep only first three a-z
//$ciso=substr(ereg_replace('[^a-z]','',$ciso),0,3);
if (empty($zid)) {
// get the default zone if not given in cookie
$fm->query('select zoneid from master');
$fm->next_record();
$zid = (int) $fm->f('zoneid');
$fm->free_result();
}
// make sure a zone exists for the value in the cookie
// take the first we get if no such zone
$fm->query("select zonedeflid,zflag1 from zone where zoneid={$zid}");
if ($fm->next_record()) {
$deflid = (int) $fm->f('zonedeflid');
$zflag1 = (int) $fm->f('zflag1');
$fm->free_result();
} else {
$fm->query('select zoneid,zonedeflid,zflag1 from zone');
$fm->next_record();
$zid = (int) $fm->f('zoneid');
$lid = (int) $fm->f('zonedeflid');
$zflag1 = (int) $fm->f('zflag1');
$fm->free_result();
示例14: count
<?php
}
// order line count > 0
?>
</form>
<?php
//auxilliary links. jheg
echo "<br />";
$fcal = new FC_SQL();
$fcal->query("select count(*) as cnt from auxlinks where loc=2");
$fcal->next_record();
$auxlinkcnt = (int) $fcal->f('cnt');
$fcal->free_result();
$fcal->query("select title, url from auxlinks where loc=2 order by seq");
if ($auxlinkcnt) {
?>
<tr><td class="showcartcell" align="center" valign="top" colspan="4" bgcolor="#FFFFFF">
<?php
while ($fcal->next_record()) {
$url = stripslashes($fcal->f("url"));
eval("\$url = \"{$url}\";");
echo '| <a href="' . $url . '"><b>' . stripslashes($fcal->f("title")) . "</b></a> |\n";
}
$fcal->free_result();
?>
</td></tr>
<?php
}
示例15:
$fcca->query("select * from prodrel where relzone={$zoneid} and relsku='{$relsku}'");
if ($fcca->next_record()) {
$prelf = 1;
} else {
$prelf = 0;
}
$fcca->free_result();
/*fetch prodflag1 from prod table
Any other prodflag1 flag other then prodrel should be added here to keep
prodflag1 complete
*/
$fccb = new FC_SQL();
$fccb->query("select prodflag1 from prod where prodsku='{$relsku}' " . "and prodzid='{$zoneid}'");
$fccb->next_record();
$prodflag1 = (int) $fccb->f("prodflag1");
$fccb->free_result();
$flag1 = 0;
if ($prodflag1 & $flag_noship) {
$flag1 |= (int) $flag_noship;
}
if ($prodflag1 & $flag_notax) {
$flag1 |= (int) $flag_notax;
}
if ($prodflag1 & $flag_novat) {
$flag1 |= (int) $flag_novat;
}
if ($prodflag1 & $flag_useesd) {
$flag1 |= (int) $flag_useesd;
}
if ($prodflag1 & $flag_genesd) {
$flag1 |= (int) $flag_genesd;