Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. $dbhost = "localhost";
  3. $dbuser = "id788089_smartcollegeapp";
  4. $dbpass = "smart123";
  5.  
  6. mysql_connect("$dbhost","$dbuser","$dbpass") or die(mysql_error());
  7. mysql_select_db("id788089_smartcollegeapp");
  8.  
  9. $date = date('Y-m-d H:i:s');
  10.  
  11. $table=trim($array_not_present_student[0]).'_'.trim($array_not_present_student[1]).'_'.trim($array_not_present_student[2]).'_'.trim($array_not_present_student[3]).'_'.trim($array_not_present_student[4]);
  12.  
  13. $new ="ALTER TABLE ".$table." ADD ".$date." VARCHAR(255) NOT NULL";
  14. mysql_query($new)or die(mysql_error());
  15.  
  16.  
  17.  
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement