Ver Mensaje Individual
  #9 (permalink)  
Antiguo 14/11/2009, 00:29
dfmex
 
Fecha de Ingreso: octubre-2008
Mensajes: 147
Antigüedad: 15 años, 6 meses
Puntos: 3
Respuesta: ¿Cómo puedo Filtrar una búsqueda en PHP?

Gracias por tu respuesta;

puse el siguiente codigo:

Código PHP:
<?php
$q
=mysql_query("SELECT * FROM estudiantes ORDER BY Matricula DESC");
while(
$r=mysql_fetch_array($q)){
 
$valor[]=$r['Matricula']; 
 
$rest=substr($valor, -6);
 
$sigue=max($valor);
 
$next=$sigue+1;
 echo 
$next;
}
?>
y me arroja el siguiente error:

Código:
Warning: substr() expects parameter 1 to be string, array given in G:\XAMPP W7\xampp\htdocs\icp\test.php on line 21
1
Warning: substr() expects parameter 1 to be string, array given in G:\XAMPP W7\xampp\htdocs\icp\test.php on line 21
1
Warning: substr() expects parameter 1 to be string, array given in G:\XAMPP W7\xampp\htdocs\icp\test.php on line 21
1