Changes

Jump to: navigation, search

Genesetdb

488 bytes added, 03:30, 26 October 2013
no edit summary
<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>genetablefor the ooga</title>
</head>
<body>
<th>Gene ID</th>
</tr>
';<?php$sqlcon=mysqli_connect("localhost", "ooga", "SELECT * FROM `workaround`;booga";$result= mysqli_query($con,$sql"genesetdb");$pid=1;$genes=0;while if($row=mysqli_fetch_arraymysqli_connect_errno($result))
{
die( "could not connect: " . mysqli_connect_error());}// Get absolute count of rows in table "genesets"; export// that count into a variable called $pidcount$sql = "SELECT COUNT(*) AS cnt FROM `genesets`;";$result = mysqli_query($con, $sql);$row = mysqli_fetch_array($result);$pidcount = $row['cnt'];/* Now get the entirety of genesets and CHOWN THE HELL OUT OF IT!Where "CHOWNing" in this case means the generation of a tablethat looks roughly like:pid geneid--- ------1 $row[3]1 $row[4]1 $row[5]...1 $row[203]2 $row[3]...*/$sql = "SELECT * FROM `genesets`;";$result = mysqli_query($con, $sql);while($row = mysqli_fetch_array($result)){ for($i=03; $i<200204; $i++) { mysqli_query( $con,booga = "INSERT INTO TABLE `finalgeneset` (exp,geneid) VALUES(BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY" . $pid row[0] . ",". $row[$genesi] . ");"; $ooga = mysqli_query($con, $booga); echo '
<tr>
<td>' . $pid row[0] . '</td> <td>' . $row[$genesi] . '</td>
</tr>
'; $genes++; } $pid++; $genes = 0;
}
echo'?>
</table>
</body>
</html>
';?></syntaxhighltightsyntaxhighlight>
1,845
edits

Navigation menu