Jump to content

brown2005

Members
  • Posts

    942
  • Joined

  • Last visited

Everything posted by brown2005

  1. Hi, I have a table monthly with the following fields; month bigint(15)                position bigint(15)              person bigint(15)                hits bigint(15) what i want to do is group things by the month, i.e. 7 8 9 then have a table for each month position - person - hits so 7        position - person - hits 1 - Name - 54 8      position - person - hits 1 - Name - 54 2 - Name2 - 12 etc. thanks for any help in advance. regards richard
  2. hi, what i want is to get a set of results from the mysql database and when using while{ } i want to change the colors of the rows... one red, one blue, one red, one blue.. thanks
  3. Hi, Huggie, With your code, what if you want to discount duplicate entries...?
  4. Hi, yeah both of them codes are very useful, thank you very much. What I need to do now if it is possible, is say i have a field in a table number i want to count the number of records in the table where a . is in it? can this be done...?
  5. i dont think that is really what i needed, as i could have a number that has say; 435.345.34 thanks richard
  6. hi, i have two numbers; $n1 = "453.23423"; $n2 = "45323423"; i want to echo $n1 has 1 . in it $n2 has 0 . in it any help please...
  7. function MembersCount() { $MembersCountSql = mysql_query("SELECT * FROM members WHERE members_activated='1';"); $MembersCountRows = mysql_num_rows($MembersCountSql); $MembersCountRows = number_format($MembersCountRows); return $MembersCountRows; } Is there any better way to write the above?
  8. hi, i was wondering if you can, how you select all records that have say one field not null
  9. can ne1 help with the above please?
  10. thank you very much for your help...
  11. Hi, What I have is a form <form method='post' action='2.php'> <input type='hidden'> <input type='submit'> </form> what i want is say a 20 second countdown on the form before the submit button is active... ne ideas please?
  12. hi i have the row color sorted now, but i want to be able to add <a></a> behind a whole <tr></tr> and not just a link... ne ideas please? <a href="'.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.'" class="blue_bold_none" target="_blank">'.$adverts_link.'[/url] thats what i want in the row..
  13. yes taith, thank you very much, i cant believe i didnt spot it...
  14. $adverts_seen_query = mysql_query("SELECT * FROM adverts_hits WHERE adverts_hits_website='1' AND adverts_hits_user='1'"); god i feel thick now, missed the magic mysql_query()
  15. $adverts_seen_query = "SELECT * FROM adverts_hits WHERE adverts_hits_website='1' AND adverts_hits_user='1'"; $adverts_seen_rows = mysql_num_rows($adverts_seen_query);    echo $adverts_seen_rows; the problem is that, as it doesnt echo nething at all, but i dont see it... ne ideas?
  16. it is a function i have written myself which i have included in it.. it prints this out fine...
  17. what it is suppose to do is change the background color of the row if it has been seen...
  18. if(isset($_SESSION['MemberID'])) {   $rank = 1; $adverts_query = "SELECT * FROM adverts ORDER BY adverts_link_amount DESC, adverts_link_date ASC"; $adverts_result = mysql_query($adverts_query) or die (mysql_error());     while ($adverts_array = mysql_fetch_array($adverts_result, MYSQL_ASSOC))     {     $adverts_id = $adverts_array['adverts_id'];      $adverts_link = $adverts_array['adverts_link']; $adverts_link_url = $adverts_array['adverts_link_url']; $adverts_link_amount = number_format($adverts_array['adverts_link_amount']); $adverts_link_date = explode(" ",$adverts_array['adverts_link_date']); $adverts_link_date_date = $adverts_link_date[0]; $adverts_link_date_time = $adverts_link_date[1];     $rankStr = ordSuffix($rank); $adverts_seen_query = "SELECT * FROM adverts_hits WHERE adverts_hits_user='$session_id' AND adverts_hits_website='$adverts_id ';"; $adverts_seen_rows = mysql_num_rows($adverts_seen_query);  if($adverts_seen_rows > 0) {   echo'    <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="DoNav('.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.');">           <td align="center" class="text_bold_seen" height="30">'.$rankStr.'</td>           <td align="center" class="text_bold_seen"><a href="'.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.'" class="blue_bold_none" target="_blank">'.$adverts_link.'</a></td>           <td align="center" class="text_bold_seen">'.$adverts_link_date_date.'<br>'.$adverts_link_date_time.'</td>           <td align="center" class="text_bold_seen">£ '.$adverts_link_amount.'</td>                     </tr>'; $rank ++;         }         } }
  19. yeah cool, what happens if i wanna change the date from yyyy-mm-dd to dd-mm-yyyy
  20. say in the database i have adverts_link_date = $adverts_array['adverts_link_date']; is adverts_link_date = "2006-12-08 10:38:14"; i want $adverts_link_date_date = 2006-12-08; $adverts_link_date_time = 10:38:14;
  21. hi i currently have $adverts_link_date = $adverts_array['adverts_link_date']; $adverts_link_date_date = ; $adverts_link_date_time = ; but i have totally forgotten how to split the date and time up. its stored in mysql as date/time. thanks richard
  22. echo'    <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="DoNav('.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.');">           <td align="center" class="text_bold" height="25">'.$rankStr.'</td>           <td align="center" class="text_bold"><a href="'.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.'" class="blue_bold_none" target="_blank">'.$adverts_link.'</a></td>           <td align="center" class="text_bold">£ '.$adverts_link_amount.'</td>                   </tr>'; i have that code, which the color changes fine but the <tr> click to new link doesnt... basically wat i want to do is take the link from <a href="'.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.'" class="blue_bold_none" target="_blank">'.$adverts_link.'</a> and add it to the row, so when u click anywhere in row it goes to the page.. ne help would be much appreciated... thanks in adance.. o and currently i have function DoNav(theUrl) { document.location.href = theUrl; }
  23. how do u do that then mate, please?
  24. thanks, but i dont want it to keep happening to me so what can I do? do i need to rewrite all the code so it works or is there an easier way?
  25. ok, cool, well that works, but I dont want me or people to my site to be doing this everytime, how can i avoid it...?
×
×
  • 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.