#49994 [NEW]: mysql_num_fields error agregar nota

From: Date: Sun, 25 Oct 2009 23:35:32 +0000
Subject: #49994 [NEW]: mysql_num_fields error agregar nota
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-6272@lists.php.net to get a copy of this message
From: okhugo2000 at yahoo dot com Operating system: xp PHP version: Irrelevant PHP Bug Type: Website problem Bug description: mysql_num_fields error agregar nota Description: ------------ Intenté poner esta nota: funcion genérica para crear una tabla con cualquier SELECT, la hice como herramienta de depuración <?PHP function ver_tabla($con,$pega,$ver=0,$largo=100){ /* $con= consulta $pega= identificador de conexión $ver= mostrar el contenido de la consulta $largo=carateres en la columna */ $tabla=" <!--Generado con el script ver_tabla.Consulta:\n". $con."\n -->\n "; if($ver){$tabla.="<pre>".$con."</pre>";} $res=mysql_query($con,$pega); $t_c=mysql_num_fields($res); $tabla.= mysql_num_rows($res). " registros\n" ; $tabla.= "<table border=\"1\">\n<tr>"; for($x=0; $x<$t_c; $x++){ $t=mysql_field_name($res, $x); $tabla.="\t<th title=\" ".$t." \" >".substr($t,0,$largo)."</th>\n"; } $tabla.="</tr>\n"; while ($fila = mysql_fetch_array($res)){ $tabla.="\t<tr>\n"; for($x=0; $x<$t_c; $x++){ if(!($fila[$x]{0})){$fila[$x]="?";} $tabla.="\t<td title=\" ".$fila[$x]." \" >".substr($fila[$x],0,$largo)."</td>\n"; } $tabla.="</tr>\n"; } $tabla.="</table>"; return $tabla; } ?> Reproduce code: --------------- --- From manual page: function.mysql-num-fields --- Expected result: ---------------- Gracias!! Actual result: -------------- There was an internal error processing your submission. Please try to submit again later. -- Edit bug report at http://bugs.php.net/?id=49994&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49994&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49994&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49994&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49994&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49994&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49994&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49994&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49994&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49994&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49994&r=support Expected behavior: http://bugs.php.net/fix.php?id=49994&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49994&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49994&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49994&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49994&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49994&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49994&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49994&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49994&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49994&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49994&r=mysqlcfg

« previous php.webmaster (#6272) next »