karimali831 Posted April 19, 2010 Share Posted April 19, 2010 Hi I'm trying to add a 1on1 column to my cup_matches table and insert value "1" if ID in the cups table has value "1" in the 1on1 column or insert value "0" if ID in the cups table has value "0" in the 1on1 column. See attatchments to help. I believe there is something wrong with my code: <?php $getid=safe_query("SELECT cupID FROM ".PREFIX."cup_matches"); while($ds=mysql_fetch_array($getid)) $cupID = $ds['cupID']; $is1on1=safe_query("SELECT 1on1 FROM ".PREFIX."cups WHERE ID='$cupID'"); $dl=mysql_fetch_array($is1on1); mysql_query("ALTER TABLE `".PREFIX."cup_matches` if($is1on1($cupID)) ADD `1on1` INT( 11 ) NOT NULL default '1' AFTER `einspruch`, else ADD `1on1` INT( 11 ) NOT NULL default '0' AFTER `einspruch`;") OR die(PREFIX.'cup_matches <font color="red">failed!</font><br> You have already updated to V4.1.4b!<br />'); echo '<center><h2>Successfully updated to V4.1.4b!</h2><br><a href="index.php"><b>View Site</b></a></center>'; ?> Any help I'll appreciate, thank you. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
karimali831 Posted April 19, 2010 Author Share Posted April 19, 2010 aanyone please? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.