Jump to content

Alexv

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Alexv's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Maybe this is what you are looking for. http://www.php.net/manual/en/function.session-status.php
  2. Next time take a closer look when someone gives you advice. http://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html
  3. Have you tried fulltext indexes? http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html
  4. It's ok to use a return. But in your case you will only return the first value from the database not the whole result set from the query. http://php.net/manual/en/function.return.php
  5. I only changed 3 lines of code above the while loop. Your select/display logic is still the same. BTW your are printing result['title'] not returning it.
  6. Only way i can think of is by using JavaScript.
  7. I hope this helps. <?php function searchByName($carTitle) { $query = "SELECT * FROM car WHERE `title`= '$carTitle'"; $searchQuery = mysql_query($query) or die(mysql_error()) ; echo $query; while($results = mysql_fetch_assoc($searchQuery)){ print($results['title']); }} ?>
  8. Are you using any framework or did you build app from scratch? It looks to me like CodeIgniter thats why i said to fix the link in JS. What is the name of class inside of admin/index.php controler?
  9. The path for that controler function is admin/index/getCity. Change your javascript.
  10. How does the table look like and how many records does it have?
  11. You should turn on your error_reporting. Take a good look at this line if (fwrite($file, $name "," . $email)) I think there is something missing from the picture
  12. Just good coding practice. You can do it without that line but if you turn on all errors php will give a Notice about an undefined variable $points. It will still work but i just like it to be by the book
  13. You need to remove the values that are < 70. Add this line after that first echo. unset($scores[$key]);
  14. $points = 0; while( $row = mysql_fetch_assoc($query)) { if($clanID==$row[clan1] && $row[score1] > $row[score2]) { $points += $row[score1]; } if($clanID==$row[clan2] && $row[score1] < $row[score2]) { $points += $row[score2]; } } return $points; That should return the sum of all values.
×
×
  • 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.