frozenpeas
Technical User
Hello. A few of you have already helped me on a related issue. Here is the page in question:
The box links on the left are generated from $myQuery below.
When you click on a link, the following code should display its details using $myQuery2:
The $project and $type variables are indeed being set. From what I can tell, $row_myQuery2 is either empty or being reset. Does anyone have an idea as to why?
Thanks.
frozenpeas
The box links on the left are generated from $myQuery below.
Code:
mysql_select_db($database_connect, $connect);
if(!$type){
$type = "web";
}
$query_myQuery = "SELECT * FROM folio WHERE type = '".$type."'";
$myQuery = mysql_query($query_myQuery, $connect) or die("Could not access database. ".mysql_error());
$row_myQuery = mysql_fetch_assoc($myQuery);
$totalRows_myQuery = mysql_num_rows($myQuery);
if(isset($project)){
$query_myQuery2 = "SELECT * FROM folio WHERE type = '".$type."' AND project = '".$project."'";
$myQuery2 = mysql_query($query_myQuery2, $connect) or die("Could not access database. ".mysql_error());
$row_myQuery2 = mysql_fetch_assoc($myQuery2);
$totalRows_myQuery2 = mysql_num_rows($myQuery2);
}
When you click on a link, the following code should display its details using $myQuery2:
Code:
<? if($row_myQuery2){ ?>
<p class="center"><img src="<? echo $type;?>/images/<? echo $row_myQuery2['pic'];?>" border="0" title="<? echo $row_myQuery2['name'];?>" /></p>
<p><strong><? echo $row_myQuery2['name'];?></strong>
<? if($row_myQuery2['url']){?>
| <a href="<? echo $row_myQuery2['url'];?>" target="_blank">launch website</a></p>
<? }?>
<p><? echo $row_myQuery2['description'];?></p>
<? if($row_myQuery2['samples']){?>
<p><? echo $row_myQuery2['samples'];?></p>
<? }
The $project and $type variables are indeed being set. From what I can tell, $row_myQuery2 is either empty or being reset. Does anyone have an idea as to why?
Thanks.
frozenpeas