0
$result=("select * FROM blablabla ") ;
while($row = mysql_fetch_array($result))

{$another=("select * FROM blablabla ") ;
 while($dow = mysql_fetch_array($another)){} }

this doesn't work please give me a tip

3 Answers 3

2

You're not actually running your queries:

$result=mysql_query("select * FROM blablabla ") ;
while($row = mysql_fetch_array($result))
{
  // do stuff
}

Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO, or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.

Sign up to request clarification or add additional context in comments.

1 Comment

no i'm interested is there anithing wrong when i am fetching one table and while doing this connecting and fetching the same table
0

maybe you mean,

$result = mysql_query("select * FROM blablabla ") ;
while($row = mysql_fetch_array($result))
{

}

1 Comment

this is what i mean and blablabla is the same one table $result=("select * FROM blablabla ") ; while($row = mysql_fetch_array($result)) {$another=("select * FROM blablabla ") ; while($dow = mysql_fetch_array($another)){} }
0

your while loops should work , u may have some error somewhere else .

look this post where there 3 while loops inside eachother

and my tips is try to debug your code and see where it doesnt work and second tips is try to move to PDO or MYSQLI

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.