Jump to content

Bickey

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Bickey's Achievements

Member

Member (2/5)

0

Reputation

  1. This is my SEARCH code. $like = "SearchWord LIKE '%".implode("%' OR SearchWord LIKE '%", explode(' ', $Var))."%'"; $query = "SELECT * FROM db1 WHERE $like ORDER BY ToDate ASC"; $results = mysql_query($query); Currently this code search every word in the MYSQL column. (e.g. If a user enter a 3 words and hit the search button, it still take the two words as individual words and outputs all records which has either of those 3 words.) My need is to make the code find ALL the search words match in any sequence. Example: Wooden toy for 3 year old Metal sward Dora cotton pillow Wooden sward if the user search using "wooden toy" the code should show only "Wooden toy for 3 year old" if the user search using "wooden" the code should show "Wooden sward" and "Wooden toy for 3 year old"
  2. In my MYSQL db how do I format a single or two digit number to have 0 in front? (e.g. 005, 012)
  3. How do I include .$email to the mail function. this is my current code: mail($to, $subject, "", $headers); I want do it like this; mail("me@myweb.com".$email, $subject, "", $headers); Thanks Bickey.
  4. How can I make a specified IP access a certain folder (URL)? I came across this code but I'm not sure how to make it access just one folder AuthName "Protected" AuthType Basic <Limit GET POST> order deny,allow deny from all allow from 100.100.100. </Limit>
  5. Bickey

    Delete all

    What is the syntaxt which is used to delete all records from a database? Thanks. Bickey.
  6. Bickey

    index

    yes. that was just for illustrative purposes (an example). I'm not too sure if it's safe to give the actual domain here. Any advice is highly appreciated. Thanks. Bickey.
  7. How do I make the username and password checking CASE SENSITIVE? $result=sprintf("SELECT * FROM db WHERE username = '%s' AND watchword ='%s'", mysql_real_escape_string($username), mysql_real_escape_string($password)); Thanks. Bickey.
  8. Why does the index show up when I hit a URL without a file name in the browser. E.g. www.nba.com/home/pic/player2.html - shows the webpage (as usual) BUT www.nba.com/home/pic/ - shows the file index inside that folder. What's the reason? How can I disable this?
  9. the variables output is correct. But I think my code is causing problems. when I test with the first 2 conditions it works but when I add the 3rd condition it doesn't give the desired output. ... in the 3rd condition I want check if tf2 is blank AND tf says apple (both should be true in the 3rd condition).
  10. I'm confused... how do you say check if the field in MYSQL is blank? it's not getting what I'm attempting to get. Please help. I want to do actionA... if either of these 3 conditions are true tf1=="RED" tf1=="" tf2=="" AND tf=="apple" if(tf1=="RED" or tf1=="" or tf2=="" AND tf=="apple") { do actionA... }
  11. Thank you Pikachu2000. I'll give it a try.
  12. I'm saving customer comments in an MYSQL. But the when I use mysql_real_escape_string() to filter the input data it's causing wired signs when it's displayed in the guest book. (E.g. whenever there is a ' sign, the output is \'). Is it safe to have a guest book without mysql_real_escape_string( or please suggest how should I go about creating this guest book on my website. Thanks. Bickey.
  13. ok, looking at the table below, can someone tell me how to get the count of "MAX" in row 1? id field1 field2 field3 field4 1 MAX MIN MAX MAX 2 MIN MIN MIN MAX
×
×
  • 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.