Jump to content


Photo

Master/detail page


  • Please log in to reply
1 reply to this topic

#1 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 12 February 2006 - 04:01 AM

Hi all, First off thank you for taking the time to read this. I did search for this problem on this site and several other areas and couldnt find anything. So hopefully I am not repeating another topic that in my frustration I cant find.
So here's my problem;
1st problem, I'm new at this which leads to the second problem.

I want to create a master/detail pages one that lists all the cities in a county then when for the details it would go a a city page. That part I got but when I set up the master detail page.
the master page looks like I want but in preview I click on a 'city" and I get
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Name = '' LIMIT 0, 10' at line 1"
the code for the master page is:
<table border="1" align="center">
<tr>
<td>county</td>
<td>CityName</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['county']; ?>&nbsp; </td>
<td><a href="adamscities.php?recordID=<?php echo $row_Recordset1['CityName']; ?>"> <?php echo $row_Recordset1['CityName']; ?>&nbsp; </a> </td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<br>
<?php echo $totalRows_Recordset1 ?> Records Total
the code for the detail page is
<tr>
<td>county</td>
<td><?php echo $row_DetailRS1['county']; ?> </td>
</tr>
<tr>
<td>CityName</td>
<td><?php echo $row_DetailRS1['CityName']; ?> </td>
</tr>
<tr>

I have no clue what to do, I have used the wizard/set it up block by block.
any help, suggestions, ideas would be greatly appreciated.
Thanks, Michelle

#2 fusionpixel

fusionpixel
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 17 February 2006 - 04:30 AM

you need to show us your SQL lines of code. i have the feeling that you are posting the code right after the problem. It sounds to me kinda you are missing a " somewhere or they are just missplaced.
Did you know there is a manual for PHP? [a href="http://" target="_blank"]http://www.php.net[/a]
Did you know there is a manual for mySQL? [a href="http://" target="_blank"]http://www.mysql.org[/a]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users