Genesetdb

From Pathology Education Instructional Resource
Revision as of 02:39, 26 October 2013 by Seung Park (talk | contribs)
Jump to: navigation, search

<syntaxhighlight lang="php"> <?php $con= mysqli_connect("localhost", "ooga", "booga", "genesetdb"); if(mysqli_connect_errno()) { die( "could not connect: " . mysqli_connect_error()); } echo' <html>

 <head>
   <title>genetable</title>
 </head>
 <body>

Genetable

'; $sql="SELECT * FROM `workaround`;"; $result= mysqli_query($con,$sql); $pid=1; $genes=0; while ($row=mysqli_fetch_array($result)) { for($i=0; $i<200; $i++) { mysqli_query($con,"INSERT INTO TABLE `finalgeneset` VALUES(BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY" . $pid . ",". $row[$genes] . ");"); echo ' '; $genes++; } $pid++; $genes = 0; } echo'
Experiment Number Gene ID
' . $pid . ' ' . $row[$genes] . '
 </body>

</html> '; ?> </syntaxhighltight>