Estoy haciendo un menu y estoy extrayendo categorias pero tengo un problema... cuando coloco mi codigo de esta manera
Código PHP:
mysql_select_db($database_azimut, $azimut);
$query_Recordset1 = "SELECT * FROM categoria ORDER BY nombre ASC";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $azimut) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 100' at line 1
Código PHP:
mysql_select_db($database_azimut, $azimut);
$query_Recordset1 = "SELECT * FROM categoria WHERE id_cat = 1 ORDER BY nombre ASC";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $azimut) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);