Page 1 of 1

Problem with fetching data

Posted: Mon Nov 27, 2006 11:31 pm
by B.Murali Krishna
Hello Every One,
I have a problem of fetching database from a huge table of allmot 3500 lines, the query was't exicuted and not getting any values. Any Suggestions please tell for me.

Thanking u
Regards,
Murali

Posted: Mon Nov 27, 2006 11:35 pm
by potato
what so you have already?
Any more information please...

Posted: Mon Nov 27, 2006 11:47 pm
by aaronhall
Especially any errors you were getting with mysql_error().

Posted: Mon Nov 27, 2006 11:50 pm
by visonardo
i dont know what exactly you need but here i show you a way to fetch the row´s ammount of your table.

(with mysql)

Code: Select all

$data=mysql_query('SELECT count(*) as cant FROM table',$link);
$show=mysql_fetch_assoc($data);

echo $show['cant'];
it would show you the row´s ammount that has your table. hope it be useful to you :wink:

Posted: Tue Nov 28, 2006 10:52 pm
by aaronhall
A good way to troubleshoot database bugs/errors is to add mysql_error() to your queries, like such:

Code: Select all

$data=mysql_query('SELECT count(*) as cant FROM table',$link) or die(mysql_error());