Re: Fw: Retrieving records
| From: | Andy Hoffman | Date: | Wed, 02 Aug 2000 14:23:11 +0000 |
| Subject: | Re: Fw: Retrieving records | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1477@lists.php.net to get a copy of this message | ||
Danilo Meles wrote:
> > > I'm trying to output data from a table in my database, I've used the php
> > > code as you can see below. But supose the table has 50 records, the code
> > > above only retrieve 49 records.
Daniel... about the best thing I can suggest is that something might be off in
your data itself... if you simply do a "select * from coleta" within mySQL (run
it on the command line from the mySQL bin directory), how many records are
returned? It's possible that when you entered the data, something got off a
bit. Also, try browsing the data with something like phpMyAdmin (mySQL database
editor downloadable from www.phpwizard.com) and see what you get there. That
will tell you if it is your code/your data/or something else :)
> > > $query="Select * from coleta order by id asc";
> > > $dados = mysql_query($query) or die("Select Failed!");
> > > $resp = mysql_fetch_array($dados);
> > > ?>
Also, just a hunch, what happens when you get rid of the "order by id asc"? I
know the record count SHOULDN'T be affected, but give that a shot.
--
Andy Hoffman
Web Developer
Bristol-Myers Squibb
email: andy.hoffman@bms.com