troubleshooting Question

How can i implement my own mysql query into an JOOMLA 2.5 page

Avatar of Solenthaler
Solenthaler asked on
4 Comments1 Solution1615 ViewsLast Modified:
Must implement the following mySQL query-code into an Joomla Article:
Here is my code example (the complete code is attached) this is the ->index.php

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chained Select Boxes using PHP, MySQL and jQuery</title>
<script type="text/javascript" src=""></script>

<script type="text/javascript">
$(document).ready(function() {
      $.get("func.php", {
            func: "drop_1",
            drop_var: $('#drop_1').val()
      }, function(response){
        setTimeout("finishAjax('result_1', '"+escape(response)+"')", 400);
          return false;

function finishAjax(id, response) {

<form action="" method="post">
    <select name="drop_1" id="drop_1">
      <option value="" selected="selected" disabled="disabled">Select a Category</option>
      <?php getTierOne(); ?>
    <span id="wait_1" style="display: none;">
    <img alt="Please Wait" src="ajax-loader.gif"/>
    <span id="result_1" style="display: none;"></span>
<?php if(isset($_POST['submit'])){
      $drop = $_POST['drop_1'];
      $tier_two = $_POST['tier_two'];
      echo "You selected ";
      echo $drop." & ".$tier_two;
<p><a href="three-tier/">View 3 Tier Select Box Example</a></p>
Is there an elegant way. I did never implement own DB Queries into Joomla.
The DB-Part is a new table in Joomlas Main DB.
1. How is the connection to the table done?
2. Is there an other issue with the DB?
3. Where must the PHP-Code be implemented?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros