I am fetching data from a column of another table and inserting so it adds the number columns in this table according to the number of data present in the first column, but its not working.
$que='select n_quid from nsnsbl0122_qp order by n_quid asc'; $que1=mysql_query($que); $que2=mysql_num_rows($que1); $table = 'ns22_sp'; for($i=0;$i<$que2;$i++){ $ que3=mysql_fetch_array($que1); $add = mysql_query("ALTER TABLE $table ADD COLUMN ".$que3['n_quid']." SMALLINT(6) NOT NULL, AFTER f_ex_status"); }; };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)