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
https://forums.phpfreaks.com/topic/130536-help/
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
https://forums.phpfreaks.com/topic/130536-help/#findComment-677211
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.