Re: SQL para este script
| From: | Lic. Miriam Michaca González | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: SQL para este script | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-14406@lists.php.net to get a copy of this message | ||
y que contiene tu variable $res ??
En la parte de arriba haces un insert y luego un while?? si quieres recorrer un while te faltaria
hacer un select que te arroje los registros que quieres mostrar y por ejemplo almacenas el
resultado en $res y entonces si haces tu while.
Miriam.
"webmaster@hackingballz.com" wrote:
> Hola... Espero me puedan ayudar.
>
> Aunque soy bueno en PHP, estoy iniciandome con MySQL, y tengo el siguiente scritp, pero me
> gustaria que me ayudaran con la tabla SQL que tengo que correr para que funcione correctamente.
>
> <?php
>
> $link = mysql_connect("localhost","admin","xxxx");
> mysql_select_db("FTP",$link);
> mysql_query("INSERT INTO tabla ( CLIENTE , HOST , USERNAME , PASSWORD ) VALUES (
> '$cliente','$host','$user','$password')",$link);
> mysql_close($link);
>
> ?>
> <table border=\"0\">
> <tr>
> <td>Cliente</td>
> <td>Host</td>
> <td>User</td>
> <td>Password</td>
> </tr>
> <?php
> while ( $row = mysql_fetch_object($res) )
> {
> ?>
> <tr>
> <td><?=$row->$cliente></td>
> <td><?=$row->$host></td>
> <td><?=$row->$user></td>
> <td><?=$row->$password></td>
> </tr>
> <?php
> } // End WHILE;
> ?>
>
> Se los agradezco de antemano.
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com