Try like this
$connection = @mysql_connect("localhost" , "userid" , "password") or die
("Unable To Connect To The Database");
$db_name = "database_name";
$db_table = "table_name";
$db = @mysql_select_db($db_name , $connection) or die ("Unable To Select
Database");
$sql_1 = "SELECT * FROM $db_name limit 0,10";
$res1_e = mysql_query($sql_1, $connection) or die(mysql_error());
$nrows =mysql_num_rows($res1_e);
while($row_info = mysql_fetch_array($res1_e))
{
echo "<br>".$row_info['id'];
}
Good Luck
kchan_bs <[EMAIL PROTECTED]> wrote: Have you
checked your database connections to ensure that you're
connected properly (i.e, server, correct table name, correct user/pwd)?
--- In [email protected], Patrick Newberry <[EMAIL PROTECTED]> wrote:
>
> Have you did an echo "<br>query = $sql_1 <br>";
>
> Then you can copy an past in phpmyadmin and verify it works.
>
> Just to check the query.
>
> Pat
> www.gypsyfarm.com<http://www.gypsyfarm.com>
>
>
>
> Never be afraid to try something new. Remember, amateurs built the
ark, and professionals built the Titanic.
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Roshan Shahare
> Sent: Monday, December 17, 2007 4:36 AM
> To: roshan Shahare
> Subject: [php_mysql] (unknown)
>
>
> We are facing problem of the fetching the rows from the table which
we created temprary
> we are able to fectch the recrods through the phpmyadmin but unable
form code
>
> $sql_1 = "SELECT * FROM ".$tableNames." limit 0,10";
> $res1_e = mysql_query($sql_1) or die(mysql_error());
> $nrows =mysql_num_rows($res1_e);
> while($row_info = mysql_fetch_array($res1_e))
> {
> echo "<br>".$row_info['id'];
> }
>
> ---------------------------------
> Now you can chat without downloading messenger. Click here to know how.
>
> [Non-text portions of this message have been removed]
>
>
>
> [Non-text portions of this message have been removed]
>
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
[Non-text portions of this message have been removed]