Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/05/2009, 21:48
tonatiuh_on
 
Fecha de Ingreso: noviembre-2006
Mensajes: 12
Antigüedad: 17 años, 5 meses
Puntos: 0
Respuesta: Problema hacer Funcion max

Genetix, gracias por responder, ya lo modifique, pero sigue igual, dejo el código modificado.
Código PHP:
<?php
function maximo($tabla$campo$llave) { 
$query "SELECT MAX($campo) AS maximo FROM $tabla WHERE num_empleado = '$llave'"

$result mysql_query($query); 
$arr mysql_fetch_array($result); 
$valor="";

if(
$arr) { 

$valor $arr['maximo'];  // nuevo


else { 
$valor 0

return 
$valor
}
?>