RES: [PHP] select in PHP + Sql Server
| From: | Marcos Mathias | Date: | Thu, 13 Sep 2001 20:51:10 +0000 |
| Subject: | RES: [PHP] select in PHP + Sql Server | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-67238@lists.php.net to get a copy of this message | ||
Thanks.
Here is the code that i'm using:
$sql = "SELECT * FROM news";
$sql_prepare = odbc_prepare($conexao, $sql) or die ("Nao foi possivel
preparar a query."); // prepara o sql
$recordset = odbc_exec($conexao, $sql); // faz a consulta
// loop no recordset
while(odbc_fetch_row($recordset)) {
$newsid = odbc_result($recordset, 1);
$datetime = odbc_result($recordset, 2);
$source = odbc_result($recordset, 3);
echo ($newsid . "<br>" );
echo ($datetime . "<br>" );
echo ($source . "<br>" );
}
[]s
Marcos
-----Mensagem original-----
De: Ben.Edwards@chase.com [mailto:Ben.Edwards@chase.com]
Enviada em: Thursday, September 13, 2001 6:33 AM
Para: mmathias@vento.com.br; php-general@lists.php.net
Assunto: Re: [PHP] select in PHP + Sql Server
You're doing something wrong! Indexes are only for performance and
possibly they may be used for helping in ensuring uniquenes. sorry cant be
any more help without code.
"Marcos Mathias" <mmathias@vento.com.br> on 13/09/2001 20:40:40
Please respond to <mmathias@vento.com.br>
To: <php-general@lists.php.net>
cc:
Subject: [PHP] select in PHP + Sql Server
Hello !
I have a php program running under linux that conects into a Sql server 7
under win2k.
When I make a select in a table that doesn't contain any index, my select
returns no results. Otherwise, when the table contains at least one index,
the select works fine.
My question: Is that supposed to happen or i am doing something wrong?
Thanks and best regards!
Marcos Mathias
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net