Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/11/2011, 18:33
Avatar de Briss
Briss
 
Fecha de Ingreso: junio-2011
Mensajes: 1.293
Antigüedad: 12 años, 10 meses
Puntos: 12
Respuesta: strcmp numero de parametros

Lo eh hecho asi por si a alguien le sirve

mysql_select_db($database_connection, $connection);
$query_profesor =sprintf("SELECT * FROM docentes");
$profesor = mysql_query($query_profesor, $connection) or die(mysql_error());
$row_profesor = mysql_fetch_assoc($profesor);
$totalRows_profesor= mysql_num_rows($profesor);

<?php
do {
?>
<option value="<?php echo $row_profesor['Nombre']." ".$row_profesor['ApellidoPaterno']." ".$row_profesor['ApellidoMaterno']?>" <?php if (!(strcmp($row_profesor['Nombre']." ".$row_profesor['ApellidoPaterno']." ".$row_profesor['ApellidoMaterno'], $row_profesor['Nombre']." ".$row_profesor['ApellidoPaterno']." ".$row_profesor['ApellidoMaterno']))) {echo "SELECTED";} ?>><?php echo $row_profesor['Nombre']." ".$row_profesor['ApellidoPaterno']." ".$row_profesor['ApellidoMaterno']?></option>
<?php
} while ($row_profesor = mysql_fetch_assoc($profesor));
?>
</select>


Funciona :)