× If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html

Is there any sample code for relational databases?

  • miker.reaganindustries
  • Offline
More
8 years 4 months ago #3712 by miker.reaganindustries
Replied by miker.reaganindustries on topic Is there any sample code for relational databases?
I see the video I made didn't upload - I will resend when I get to the office.

Please Log in to join the conversation.

  • miker.reaganindustries
  • Offline
More
8 years 4 months ago #3713 by miker.reaganindustries
Replied by miker.reaganindustries on topic Is there any sample code for relational databases?
Hopefully this video uploads.

Please Log in to join the conversation.

  • miker.reaganindustries
  • Offline
More
8 years 4 months ago #3714 by miker.reaganindustries

Please Log in to join the conversation.

More
8 years 4 months ago - 8 years 4 months ago #3715 by rebers.afscmelocal52
Replied by rebers.afscmelocal52 on topic Is there any sample code for relational databases?
This has been an interesting rabbit hole. To match the behavior of the other form, you'll need to install and enable the DirectPHP plug-in for Joomla ( courtesy link ). There are probably other ways to do this, but it looks like you're stuck with mine. Note: the code will not work without DirectPHP. Also, you'll need set 'Documents per Page' to 1 and turn off 'Show only Searchform' in the menu item. I didn't finish all the output fields--you can probably take it from here.
<!-- Parametric Search -->

<h3>Suspension Quick Lookup</h3>
<table style="width:50%"><tbody>
  <tr>
    <td>Manufacturer:</td>
    <td style="width:66%;">{joodb groupselect|suspension_manufacturer|1|true}</td></tr>
  <tr>
    <td>Type:</td>
    <td>{joodb groupselect|suspension_type|1|true}</td></tr>
  <tr>
    <td style="border-bottom: 1pt solid #000;">Model:</td>
    <td style="border-bottom: 1pt solid #000;">{joodb groupselect|suspension_model|1|true}</td>
  </tr>

<!-- Use PHP to reveal output only when result = 1 -->
<!-- Set Menu-Item|Details|Options|'Documents per page' to 1 -->

<?php

$result=substr("{joodb resultcount}", -4);

if ($result=="of 1") { $show=""; } else { $show="style=display:none"; }

?>

<!-- Begin Loop -->
{joodb loop}

  <tr>
    <td>Description:</td>
    <td><div <?php echo $show; ?> >{joodb field|suspension_manufacturer} | {joodb field|suspension_type} | {joodb field|suspension_model}</div></td>
  </tr>
  <tr>
    <td>OEM Air Spring Number:</td>
    <td><div <?php echo $show; ?> >{joodb field|manu_primary_air_spring_no}</div></td>
  </tr>
  <tr>
    <td>Firestone Air Spring Number:</td>
    <td><div <?php echo $show; ?> >{joodb field|air_spring_fire_stone_no}</div></td>
  </tr>
  <tr>
    <td style="border-bottom: 1pt solid #000;">Goodyear Air Spring Number:</td>
    <td style="border-bottom: 1pt solid #000;"><div <?php echo $show; ?> >{joodb field|air_spring_good_year_no}</div></td>
  </tr>

<!-- Insert more output fields here -->
<!-- Bottom border treatment should appear in final output row --> 

<!-- End Loop -->
{joodb loop}

</tbody></table>

<!-- Might consider putting a search button here as well -->
{joodb resetbutton}

<!-- This is necessary for updated dropdown selections -->
<script type="text/javascript" >
jQuery('#searchForm select.groupselect').change(function(){ submitSearch(""); });
</script>
Last edit: 8 years 4 months ago by rebers.afscmelocal52.
The following user(s) said Thank You: miker.reaganindustries

Please Log in to join the conversation.

  • miker.reaganindustries
  • Offline
More
8 years 4 months ago #3716 by miker.reaganindustries
Replied by miker.reaganindustries on topic Is there any sample code for relational databases?
Oh wow -- I'm going to try it out now. You don't know how much I appreciate the help. If you ever need Joomla or design help, just holler!! Seriously. www.imgforge.com/

Please Log in to join the conversation.

More
8 years 4 months ago - 8 years 4 months ago #3717 by rebers.afscmelocal52
Replied by rebers.afscmelocal52 on topic Is there any sample code for relational databases?
Hope that works for you and thanks for the invitation.

Cheers,
RS
Last edit: 8 years 4 months ago by rebers.afscmelocal52.

Please Log in to join the conversation.

Moderators: Dirkjoest