| |||||||
| Foro de Software Para hablar de todo tipo de programas que no tengan que ver con la seguridad del PC. |
![]() |
| | Enviar a: | Herramientas |
![]() | ![]() |
| |||
| Problema con consulta en php Hola amigos de infospyware tengo un problema al unir dos tablas en mysql y que me lo muestre en una pagina en php este es el codigo <? //Conexion con la base mysql_connect("localhost","root","yoyoyo"); //Ejecutamos la sentencia SQL $result=mysql_db_query("prep","select matricula,nombre,apaterno,amaterno,mat_1,cal_1,cal _2,prom_1 from t_alumnos join t_calificaciones (on t_calificaciones.matricula=t_alumnos.matricula) where matricula='1528'"); ?> <table width="4220" height="64" border="1" align="center"> <tr> <th width="68" height="58" >Matrícula</th> <th width="43">Nombre</th> <th width="40">A. Paterno</th> <th width="660" >A. Materno</th> <th width="660" >Materia 1</th> <th width="41">cal_1</th> <th width="41">cal_2</th> <th width="360">prom_1</th> </tr> <? //Mostramos los registros while ($row=mysql_fetch_array($result)) { echo '<tr><td>'.$row["matricula"].'</td>'; echo '<td>'.$row["nombre"].'</td>'; echo '<td>'.$row["apaterno"].'</td>'; echo '<td>'.$row["amaterno"].'</td>'; echo '<td>'.$row["mat_1"].'</td>'; echo '<td>'.$row["cal_1"].'</td>'; echo '<td>'.$row["cal_2"].'</td>'; echo '<td>'.$row["prom_1"].'</td></tr>'; } mysql_free_result($result) ?> </table> las tablas y los registros ya existen en ambas tablas y matricula es la clave principal en las 2 tablas me manda el siguiente error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\php\Prepa\Vespertino\Primero\Grupo 1\materia.php on line 40 while ($row=mysql_fetch_array($result)) Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\php\Prepa\Vespertino\Primero\Grupo 1\materia.php on line 54 mysql_free_result($result) *cuando hago la consulta sobre una sola tabla si me muestra los datos gracias |
| InfoSpyware | ||
| |
![]() |
| Herramientas | |
| |
![]() |
Temas Similares | ![]() |
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Problema con mi pc, spywares y virus de nombre "numero x".exe | kingofmerol | Foro Oficial de HijackThis en español | 1 | 30/05/09 13:08:39 |
| Ayuda backdoor.win32.hupigon.goop (Solucionado) | fuserones | Temas Solucionados | 8 | 19/04/09 03:25:31 |
| Problema con backdoor.win32.VBbot.bx | b.daza | Foro de Virus y Spywares | 5 | 07/12/08 22:30:58 |
| Consulta por problema con un Win32 | louiseM | Foro de Virus y Spywares | 1 | 31/10/08 17:42:41 |
| Consulta: Problema con PHPBB2 EN PHPNUKE | cordobagamers | Ayuda General | 0 | 03/10/07 23:01:30 |