
22/06/2005, 19:50
|
| | Fecha de Ingreso: abril-2002 Ubicación: las condes
Mensajes: 184
Antigüedad: 22 años, 11 meses Puntos: 1 | |
Php Access sigo con el problema en where de php
el terminos simples odbc no me acepta la funcion WHere tipo= noticia and estado= publicado ademas Order By id Limit 3
<?
$conexion = odbc_connect("noticiasfaro","","","");
$rs = odbc_exec("select * from table where tipo=noticia");
while($res = odbc_fetch_array($rs))
echo "
<table width=\"75%\">
<tr>
<td><table width=\"281\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"100%\" bgcolor=\"#666699\" valign=\"top\"> <font color=\"#FFFFFF\" size=\"1\" face=\"Verdana, arial, helvetica, sans-serif\">$res[titulo]</font></td>
</tr>
</table></td>
</tr>
<tr>
<td><font face=\"Verdana\" size=\"1\" color=\"#FFFFFF\">$res[contenido]</font><BR>
<BR> <div align=\"right\"><a href=\"informate.php?id=$res[id]\" class=\"h2\">Más
info...</a></div></td>
</tr>
</table>";
odbc_close_all();
?>
les envio el error
Warning: odbc_execute(): supplied argument is not a valid ODBC result resource in C:\Inetpub\wwwroot\RedFaro\access.php on line 37
Warning: odbc_fetch_array(): supplied argument is not a valid ODBC result resource in C:\Inetpub\wwwroot\RedFaro\access.php on line 38
este es el codigo original
<?
$conexion = odbc_connect("noticiasfaro","","","");
$rs = odbc_exec("select * from table where tipo=noticia");
while($res = odbc_fetch_array($rs))
echo "
<table width=\"75%\">
<tr>
<td><table width=\"281\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"100%\" bgcolor=\"#666699\" valign=\"top\"> <font color=\"#FFFFFF\" size=\"1\" face=\"Verdana, arial, helvetica, sans-serif\">$res[titulo]</font></td>
</tr>
</table></td>
</tr>
<tr>
<td><font face=\"Verdana\" size=\"1\" color=\"#FFFFFF\">$res[contenido]</font><BR>
<BR> <div align=\"right\"><a href=\"informate.php?id=$res[id]\" class=\"h2\">Más
info...</a></div></td>
</tr>
</table>";
odbc_close_all();
?>
__________________ Juan Pablo Sánchez |