Jump to content

need help with mysql design


ricmetal

Recommended Posts

hiyas

i need some help in creating a mysql query.

i have four groups of options, and upon a selection of one option per group, i need to have a single mysql query to accomodate this,

so how would i go about doing this without going into a dozen if's and else's?

 

is it possible?

regardos

Link to comment
Share on other sites

not entirely sure exactly what you're after...?

$radio1=(isset($_POST['radioButton1']) )?$_POST['radioButton1']:'';
$radio2=(isset($_POST['radioButton2']) )?$_POST['radioButton2']:'';
$radio3=(isset($_POST['radioButton3']) )?$_POST['radioButton3']:'';

$sql=@mysql_query("UPDATE table SET
radio1='$radio1',
radio2='$radio2',
radio3='$radio3' 
WHERE id='$id'");

Link to comment
Share on other sites

what i need is to have a query that selects all entries based on a) all users OR b) one specific user, AND on a) all years OR b) one specific year AND a) all months OR b) one specific month AND a) oldest to new entries OR b) newest to old.

 

the only problem i can find is that each group's default option ( a) ) is not found on the database

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.