Micro Sniff
New member
I want to put multiple sql statements on one php page. I am just getting information from a database and displaying them. I have the follwqing code for all of the threee sql statemetns below.
<?php
$sql1="SELECT * FROM crgallery1_tracks WHERE type='auto' ";
$result1=mysql_query($sql1);
while($rows1=mysql_fetch_array($result1)){
?>
<div id="track">
<a class="link"><div id="name"><? echo $rows1['trackname']; ?></div></a>
<a href="<? echo $rows1['tracklink']; ?>" class="link"><div id="option">Play</div></a>
<a href="#" class="project1" id="link"><div id="option">Preview</div></a>
<div id="none">
<div id="project<? echo $rows1['id']; ?>" class="boxstyle">PREIVEW THING HERE</div></div>
</div>
<?php
}
mysql_close();
?>
Except for each other statement, there is a 2 or 3 where a 1 is on the code above. What varibales do I have to rename on each one to get them to work? I can only get my first one to work.
<?php
$sql1="SELECT * FROM crgallery1_tracks WHERE type='auto' ";
$result1=mysql_query($sql1);
while($rows1=mysql_fetch_array($result1)){
?>
<div id="track">
<a class="link"><div id="name"><? echo $rows1['trackname']; ?></div></a>
<a href="<? echo $rows1['tracklink']; ?>" class="link"><div id="option">Play</div></a>
<a href="#" class="project1" id="link"><div id="option">Preview</div></a>
<div id="none">
<div id="project<? echo $rows1['id']; ?>" class="boxstyle">PREIVEW THING HERE</div></div>
</div>
<?php
}
mysql_close();
?>
Except for each other statement, there is a 2 or 3 where a 1 is on the code above. What varibales do I have to rename on each one to get them to work? I can only get my first one to work.