|
Search Tech-Forums - link takes you to our Forum's search page. Note: The following is only a text archive! To view the actual forum discussion, please visit our website at http://www.tech-forums.net Pages:1 A [hopefully] quick question(Click here to view the original thread with full colors/images)Posted by: tommyboy123x go to next post for details code: [php] <?php $link = mysql_connect("server", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); $x = 0; $y = 0; mysql_query("CREATE TABLE temp( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), username VARCHAR(30), referralcommision INT)") or die(mysql_error()); while ($x >= 101){ while ($y >= 101){ $afs2 = 'afs'.$x.$y; mysql_query("ALTER TABLE 'temp' ADD '$afs2' VARCHAR(30) NULL DEFAULT NULL") or die(mysql_error()); $y++; } $x++; } echo 'Table Updated!'; ?> [/php] Posted by: tommyboy123x Why will this not work? I know it is a crazy while loop and should make about 10,000 fields - is that too much for mysql or PHP or my internet connection? EDIT: and yes, just now replaced all the $link data - it DOES connect Posted by: jonmon6691 holy ****! i never noticed how similar php is to perl! vBulletin Copyright ©2000 - 2003, Jelsoft Enterprises Limited. PPC Management vB Easy Archive Final - Created by Xenon |