Jump to content


Photo

DELETE FROM table where....


  • Please log in to reply
1 reply to this topic

#1 lead2gold

lead2gold
  • Members
  • PipPipPip
  • Advanced Member
  • 164 posts
  • LocationOttawa, On

Posted 13 April 2006 - 11:28 PM

          $result=db_query("SELECT softball_game.gid FROM softball_game WHERE softball_game.sid = '?'",$this->sid);
          while($row=mysql_fetch_array ($result)){
            $delresult = db_query("DELETE FROM softball_stats WHERE softball_stats.gid = '",$row['gid']);
          }


I need to simplify the above code... is it possible?
like into one db_query()?





#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 14 April 2006 - 05:16 AM

It seems you're really looking for mysql query help. You might try posting on the mysql forum on this site -- I've gotten good answers there before -- most of which refer me to the reference manual -- but good answers just the same




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users