...

View Full Version : Simple html link to data



Sculpture
01-06-2006, 01:09 AM
Hello,

The site I am building needs several html links, from images, to variouse categories. There are two foreign keys in the table so there is no need for a join. I simply wish to search those fields and gather all the relevant numbers to display on the results page. The method is a link with the correct variable.

The query:

<?php require_once('Connections/sports_connect.php'); ?>
<?php
mysql_select_db($database_sports_connect, $sports_connect);
$query_qLinks = "SELECT department_id, cat_id, advert FROM entry";
$qLinks = mysql_query($query_qLinks, $sports_connect) or die(mysql_error());
$row_qLinks = mysql_fetch_assoc($qLinks);
$totalRows_qLinks = mysql_num_rows($qLinks);
?>

I am trying to get a "detail" link modified to send to the results page to where the data will be recieved.

search_result.php?department_send=<?php echo $row_qLinks['department_id']; ?>

Thanks

Element
01-06-2006, 09:14 AM
I may be mistakenn, but don't you need a while() statement on that mysql_fetch_assoc() or a WHERE clause on the query?

Sculpture
01-06-2006, 11:43 PM
Thanks for your reply Element, is this getting closer?


<?php require_once('Connections/sports_connect.php'); ?>
<?php
mysql_select_db($database_sports_connect, $sports_connect);
$query_qLinks = "SELECT department_id, cat_id, advert FROM entry";
$qLinks = mysql_query($query_qLinks, $sports_connect) or die(mysql_error());
$row_qLinks = mysql_fetch_assoc($qLinks);
$totalRows_qLinks = mysql_num_rows($qLinks);
while ($result = mysql_fetch_row($qLinks)){
for ($i = 0; $i<count($record); $i ++)
}
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum