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 Answers3

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.

Zoe
  • 27,060
  • 21
  • 118
  • 148
John Conde
  • 217,595
  • 99
  • 455
  • 496
0

maybe you mean,

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

}
John Woo
  • 258,903
  • 69
  • 498
  • 492
  • 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)){} } – Irakli Shalamberidze Feb 08 '13 at 14:22
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

Community
  • 1
  • 1
echo_Me
  • 37,078
  • 5
  • 58
  • 78