Jump to content


Photo

Using AND or OR while running loops


  • Please log in to reply
1 reply to this topic

#1 mkosmosports

mkosmosports
  • Members
  • PipPipPip
  • Advanced Member
  • 196 posts

Posted 20 October 2006 - 10:01 PM

How come I am unable to write the following code:

while ( $row = mysql_fetch_array($result7) ) || ( $row = mysql_fetch_array($result71) )?

Thanks.

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,016 posts

Posted 20 October 2006 - 10:09 PM

Because you need extra ()'s

while ( ($row = mysql_fetch_array($result7) ) || ( $row = mysql_fetch_array($result71)) )
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users