Jump to content

nibbrwebdevelopment

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Everything posted by nibbrwebdevelopment

  1. I wanted to get some opionions on the best way to search for text in mysql. I have seen a lot of people using LIKE but this doesn't really do the job properly. I would add a full text index to the field i wish to search on, for example book_title. Maybe I want to search for books that are closest match to "The Big Game": SELECT *, MATCH(B.`book_title`) AGAINST('+The Big Game', IN BOOLEAN MODE ) AS RelevanceScore FROM `books` B WHERE ( MATCH(B.`book_title`) AGAINST ('+The Big Game', IN BOOLEAN MODE) || B.`book_title` LIKE '%The Big Game%' ) HAVING(RelevanceScore > 0) ORDER BY RelevanceScore DESC LIMIT 0,10
  2. $_group = array(); foreach ( $group as $g ) { $_group[] = sort ( $g, SORT_NUMERIC ); } $group = $_group; Not tested this.
  3. you probably need to use PHP for this. Or you could use javascript to test the URI the visitor is looking at and applying an active style to the tab.
  4. you might want to employ a developer to do this for you. it is a little much to explain.
  5. if($country = "Poland"){ // by the way this happens to be false...... should be if($country == "Poland"){ // by the way this happens to be false......
  6. <input name="chktest" type="checkbox" value="on" /> Remove value="on"
  7. $query = "SELECT q1, q2, q3, q4, q5 FROM surveys.SGID_satisfaction WHERE q1='$evaluator' AND q2= '$date' ORDER BY created"; echo "<h3>Results of SGID Satisfaction Survey for $evaluator and $date</h3></br>"; $num_rows = mysql_num_rows($result); echo "Your query returned $num_rows responses."; By the looks of it here, your not getting the number of rows because $result variable does not exist; you have not ran the query! After $query = you need to run $result = mysql_query($query);
  8. You could probable do something like: echo" <div class='box'> <div class='boxbut'> <input type='radio' name='datetime' value='". $row['day1']." ".$row['time1']."' " . ( $v_datetime == "$row[day1] $row[time1]" ? "checked" : "" ) . "> <d>". $row['day1'] ,"</d><br/><t>". $row['time1'] ."</t> </div> </div>";
  9. after looking at your diagram, you would only be able to hide the checkboxes after the form was submitted. With jQuery you would be able to hide them as soon as they are clicked! I don't see any submit button on your diagram, so can I assume the form saves information via AJAX?
  10. You could use javascript or jquery to do this. The problem is, if you completely disable the checkbox it wont get sent in the post array. There are two options I can think of, setup a jQuery event for the click on the box, if it is already checked then just don't allow it to uncheck! Second would be to test in php if it was selected and simply hide it with css. If you wish I can put together a small tutorial on my blog for you?
  11. Hi My suggestion is to return the content as JSON and use jquery to parse it...or javascript of course. I have written a small post for you http://blog.nibbrwebdevelopment.com/ajax-help/handling-ajax-return-strings-in-jquery/
×
×
  • 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.