Jump to content

therelelogo

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

therelelogo's Achievements

Member

Member (2/5)

0

Reputation

  1. hmm i'm not sure it would to be honest, may be easier to ask then is there a wilcard that would return all values whether the row was blank or had something in it? like * = searches for all? or ALL or something like that? or is that just wishful thinking?
  2. i imagine a good way to do this (as i thought about doing one for my restaraunt where i work) would be... create a page with the layout of your restaraunt, for example, put little "tables and chairs" as they appear in real life, onto the page. when a logged-in user clicks one it would "reserve" it in a database for a specific night. i think that would be the best way, you just need to call the tables like table1, table2 etc so your script knows whuich to reserve. you could also show underneath the pictures of the tables [Reserved] or [available] as needed if it was help in actually setting up the log-in feature, theres some decent tutorials on how to do this (my knowledge is limited) hope this helps
  3. any suggestions how to change it? or could point me in the right direction?
  4. hi, i'm wondering, is it possible to search by multiple fields at the same time let me re-phrase that, i know it is possible BUT (and i dont know the correct terminology here) can i search by something in the URL too? here is my code: $result = mysql_query("SELECT * FROM adverts WHERE (ad_type = 'standard') AND (category = '$_GET[cat]') AND (i_condition = '$_GET[cond]') ORDER BY item_id DESC") or die(mysql_error()); this page returns all that meet the critera of "category" and "i_condition" BUT if one is returned as null, i.e '' then any from the table that arent null are not returned. i hope i have explained this easy to understand. basically what i want to know is, if a value in the url is null (meaning nothing for that field should be searched for) how can i have it return all the results for the other url search fields? oh god i hope this makes sense. another example: /category_pages/full_cat.php?cat=entertainment /category_pages/full_cat.php?cat=entertainment&cond=new in the first link "cond" is not being searched for so i would want all fields returned that just have the matching "cat" in the second i would want to filter by both, so my question is, in the first example how can i set the code (php above) to just ignore it for the time being unless the "cond" part is in the url? any help appreciated thanks
×
×
  • 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.