List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:May 2 2002 1:43pm
Subject:Re: Problem with SELECT
View as plain text  
Unfortunately, you did not tell us what version you are running, or what 
platform you are running it on.


Try rebuilding the indexes with myisamchk or whatever is appropriate for 
your table type.

Sheni R. Meledath wrote:

> Hello:
>
> I have a problem while selecting the records from a table. This table 
> has got 15494 records. But when selecting its displaying only 1745 
> records.
>
> ###
> $result=mysql_query("SELECT COUNT(*) as numrows FROM $table2");
> $row=mysql_fetch_array($result);
> $num_rows2 = $row[numrows];
> echo $num_rows2;
> =15494
>
> $result=mysql_query("select * from $table2");
> $num_rows1=mysql_num_rows($result);       
> echo $num_rows1;
> =1745
>
> ###
>
> Using the second command I can't display all the records.
>
> But using separate select statement I can select & display any record 
> which is not displayed in the above case.
> ###
> $result=mysql_query("select * from $table2 where id='15000'");
> $row=mysql_fetch_array($result);
> echo $row[name];
> =sheni
> ###
>
> Could you please help me to figure it out.
>
> Regards
>
> Sheni R Meledath
> sheni@stripped
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread107790@stripped>
> To unsubscribe, e-mail <mysql-unsubscribe-##L=##H@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
Problem with SELECTSheni R. Meledath2 May
  • Re: Problem with SELECTGerald Clark2 May
    • Re: Problem with SELECTSheni R. Meledath2 May
  • Re: Problem with SELECTDicky Wahyu Purnomo3 May