Let me post some of my code to give a bigger picture:
<tr>
<!-- SELECT DATE -->
<td>
<input type="text" name="rpt_date" value="" size="10">
<input type="image" align="middle" value="cal1" src="./images/pdate.gif" name="cal1" onclick="cal.select(docume
</td>
<!-- CHOOSE a Publication -->
<td align="center" class="item" width="100">
<select size="1" class="textbox" id="pub_name" name="pub_name" onChange="getPubID(this)">
<option value="">-</option>
<?php
//Creates query to retrieve the data to be used in the drop down box.
$query="SELECT pub_id, pub_name from publication order by pub_name;";
if ($hResult=mysql_query($que
{
while ($hFetch=mysql_fetch_array
{
$pub_id=$hFetch["pub_id"];
$pub_name=$hFetch["pub_nam
echo "<option value='$pub_id|$pub_name'\
}
}
?>
</select>
</td>
</tr>
Main Topics
Browse All Topics





by: CraigHarrisPosted on 2006-10-11 at 14:02:39ID: 17710725
$ReportDate = '2006-09-10'; // or get this from $_GET etc. ReportDate ); }')";
";
$ReportDate = mysql_real_escape_string($
$Sql = "SELECT `pub_name` FROM `publication` WHERE`pub_id` IN (SELECT `pub_id` FROM `press_schedule` WHERE `press_date`='{$ReportDate
In older versions of MySQL you might have to do:
$Sql = "SELECT pub_name FROM publication p JOIN press_schedule ps ON p.pud_id = ps.pub_id WHERE press_date='{$ReportDate}'
The length of your question suggests you are looking for more than just this query, what is it you actually need to know?