note 46202 added to function.ibase-fetch-row
| From: | PauloCrestani-pcrestani at hotmail dot com | Date: | Sat, 02 Oct 2004 03:51:38 +0000 |
| Subject: | note 46202 added to function.ibase-fetch-row | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77726@lists.php.net to get a copy of this message | ||
<html>
<head>
<title>PHP com Interbase</title>
<style type="text/css">
td { font-family: tahoma; font-size: 10pt; }
</style>
</head>
<body>
<table cellpadding="2" cellspacing="0" width="50%">
<tr bgcolor="#AAccCC">
<td>Nome</td><td>Sobrenome</td><td>Nascimento</td>
</tr>
<?
$host = "127.0.0.1:D:\Arquivos de
programas\Borland\InterBase\Examples\database\EMPLOYEE.GDB";
$user = "SYSDBA";
$pass = "masterkey";
$conn = ibase_connect($host,$user,$pass);
$consulta = ibase_query($conn,"select * from EMPLOYEE");
$i = 0;
while($resultado = ibase_fetch_row($consulta)){
if($i % 2 == 0) $cor = "#FFFFFF"; else $cor = "#eeeeee";
$nome = $resultado[1]; $sobrenome = $resultado[2];
$nasc = $resultado[4];
$nascimento = explode(" ",$nasc);
$data = $nascimento[0];
$data = date('d/m/Y',strtotime($data));
?>
<tr bgcolor="<?=$cor;?>">
<td><?=$nome;?></td><td><?=$sobrenome;?></td><td><?=$data;?></td>
</tr>
<?
$i++;
}
?>
</table>
</font>
</body>
</html>
----
Manual Page -- http://www.php.net/manual/en/function.ibase-fetch-row.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46202
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46202&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46202&report=yes
Search -- http://master.php.net/manage/user-notes.php