Please HELP!

admin

Administrator
Staff member
Hello,

I have been trying for days to figure out how to bring back a result set of lets say, "10" with no luck and let the user have the option of viewing the next 10 and so on. I am using Informix (v 7.2), so LIMIT, FIRST N, and so on do not work. I don't know what else to do. Please help if you have any ideas. Here is my code:

<?php
$dbConnection=ifx_pconnect();
if(!$dbConnection) die("Connect Failed");
$keywordQuery=ifx_query("SELECT DISTINCT title, desc, url FROM webSearch WHERE UPPER(desc) LIKE UPPER('%$query%')", $dbConnection);
if (!$keywordQuery) die("Query Failed");
$row=ifx_fetch_row($keywordQuery);
printf("<br>");
while (is_array($row)) {
for(reset($row); $fieldName=key($row); next($row)) {
if ($fieldName==title){
$fieldValue=$row[$fieldName];
$title=$fieldValue;
}
if ($fieldName==desc){
$fieldValue=$row[$fieldName];
$desc=$fieldValue;
}
if ($fieldName==url) {
$fieldValue=$row[$fieldName];
$url=$fieldValue;
}
}
$i++;
if ($i%2) $rowBackGround="e3ecf4";
else $rowBackGround="f9f9f9";
printf("<tr bgColor='$rowBackGround'>");
printf("<br><a href='http://www.phpbuilder.com/board/archive/index.php/$url'>");
printf($title);
printf("</a><br>");
printf("<b><i><font color='#31417B'>Discription: </font></b></i>");
printf($desc);
printf("<br>");
printf("<font size='2'><i><a href='http://www.phpbuilder.com/board/archive/index.php/$url'>");
printf($url);
printf("</a></i></font><br><br>");
printf("<tr>");
$row=ifx_fetch_row($keywordQuery);
}
printf("<tr>");
printf("</tr>");
printf("<tr>");
printf("<font color='#31417B'><a href='http://www.phpbuilder.com/board/archive/index.php/#'>[Prev]</a> somenumbers <a href='http://www.phpbuilder.com/board/archive/index.php/#'>[Next]</a></font>");
printf("</tr>");
echo $row;
ifx_free_result($keywordQuery);
$dbConnection=ifx_close();
?>
Thank you

Donnie
 
Back
Top