creating tables

From: Date: Thu, 24 Oct 2002 13:04:28 +0000
Subject: creating tables
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969349240@lists.php.net to get a copy of this message
Hello fellow PHPers... This is my first post and I am not sure if I am even posting to the right group, so please bear with me here. I have run into a seriously stubborn problem. I am trying to creat a table using the following code...but here is the catch: it only create the first table and not the others. I have tried using the "while" statement instead of the "for" and ther resut is the same. It just does not want to go past the first record. Everybody i have tried to get help from outside the newsgroup has assured me the code is correct, so why is it not working? Please help. Thank you. =================== START CODE =================== $cmnd="select * from clients"; $syst=mysql_query($cmnd) or die("CANNOT LOCATE CLIENT INFORMATION"); $rows=mysql_num_rows($syst); // there are 15 rows in the table for ($i=1; $i<=$rows; $i++) { $line=mysql_fetch_row($syst); $cmnd="create table if not exists $line[0] (sys_name varchar(20));"; $syst=mysql_query($cmnd) or die("COULD NOT CREATE TABLE"); } ==================== END CODE ==================== -- Tony Tzankoff http://www.tzankoff.com =========================

« previous php.doc (#969349240) next »