Jump to content

Help


jkkenzie

Recommended Posts

Hi!

I have four fields in my table: Value, Country,Parameter and year:

 

I display the DISTINCT values from country,Parameter and year on a web page on checkboxes where the user selects the countries, parameters and the year. I display like this:

<?php 			
$order=0;
while($order < $count)
{
echo "<input type='checkbox' name='mycountries[]' value = ' ".$country[$order]."'>".$country[$order]. "<br />";
$order++;
}
echo "</td></div><td class='content'><div id='cBoxes2'>";

$order=0;
while($order < $count1)
{
echo "<input type='checkbox' name='myparameters[]' value = ' ".$parameter[$order]."'>".$parameter[$order]. "<br />";
$order++;
}
echo "</td></div><td class='content'><div id='cBoxes3'>";			
$order=0;
while($order < $count2)
{
echo "<input type='checkbox' name='myyears[]' value = ' ".$year[$order]."'>".$year[$order]. "<br />";
$order++;
}
?>

Dont mind how i connect to database a get values: I would like to have a query that SELECTS FROM MY TABLE (tbldata) where the country= the several countries the user has selected AND the parameter=the several parameters the user has selected IF THE PARAMETER CHOSEN IS AVAILABLE i.e if the countryies chosen has that particular parameter AND WHERE the years=the chosen years (could be regular or irregular)

 

thanks in advance.

Jkkenzie

Link to comment
Share on other sites

I would like to have a query that SELECTS FROM MY TABLE (tbldata) where the country= the several countries the user has selected AND the parameter=the several parameters the user has selected IF THE PARAMETER CHOSEN IS AVAILABLE i.e if the countryies chosen has that particular parameter AND WHERE the years=the chosen years (could be regular or irregular)

 

Anybody?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.