[prog] more php

Saint-Wolfe wolf at wolfrising.net
Tue Sep 16 20:04:26 EST 2003


Okay I'm trying this using the php plug ins via dreamweaver : ) but I 
am still receiving an error, can
anyone out there see what the syntax error might be?

the error message:

You have an error in your SQL syntax near '; LIMIT 0, 1' at line 1

the code:

<.?
$maxRows_Recordset1 = 1;
$pageNum_Recordset1 = 0;
if (isset($HTTP_GET_VARS['pageNum_Recordset1'])) {
   $pageNum_Recordset1 = $HTTP_GET_VARS['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_myconnection, $myconnection);
$query_Recordset1 = "SELECT term, year FROM term WHERE  
s_code=193497764;";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, 
$startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $myconnection) or 
die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($HTTP_GET_VARS['totalRows_Recordset1'])) {
   $totalRows_Recordset1 = $HTTP_GET_VARS['totalRows_Recordset1'];
} else {
   $all_Recordset1 = mysql_query($query_Recordset1);
   $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = 
ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;  
.?>



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

 If you can survive death, you can probably survive anything.  


More information about the Programming mailing list