Código PHP:
<?php
do {
?>
<option value="<?php echo $row_Recordset1['Material']?>"<?php if (!(strcmp($row_Recordset1['Material'], htmlentities($row_Recordset1['Material'])))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset1['Material']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
Código PHP:
mysql_select_db($database_coneccion, $coneccion);
$query_Recordset1 = "SELECT * FROM materiales";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $coneccion) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);