Jump to content


  • Content Count

  • Joined

  • Last visited

  • Feedback


Community Reputation

0 Neutral

About admirolas3

  • Rank

Profile Information

  • Current Mood
  • Gender
    Not Telling
  • Country

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi. Maybe someone knows the name of this font? I can't find it.. ;/
  2. Hi. I am getting this kind of an error. Maybe someone knows what i am doing wrong? Notice: Trying to get property 'total_posts' of non-object in C:\xampp\htdocs\pages\forum\forum.php on line 42 Here is the code: $update = 'SELECT forum_id FROM forum'; $update = $db -> prepare($update); $update->execute(); while($row = $update -> fetch(PDO::FETCH_OBJ)){ $post = 'SELECT post_thread, post_datestamp, post_user, (SELECT COUNT(post_entry) FROM forum_post WHERE post_forum='.$row->forum_id.') AS total_posts FROM forum_post WHERE post_forum='.$row->forum_id.' AND post_datestamp =(SELECT MAX(post_datestamp) FROM forum_post WHERE post_forum='.$row->forum_id.')'; $post = $db -> prepare($post); $post->execute(); $p_row = $post -> fetch(PDO::FETCH_OBJ); $num_of_p = $p_row->total_posts; if($num_of_p==null){ $last_post_date = null; $last_post_thread = null; $post_user = null; } else{ $last_post_date = $p_row->post_datestamp; $last_post_thread = $p_row->post_thread; $post_user = $p_row->post_user; } $post=null; $threads = 'SELECT count(thread_name) as total_threads FROM forum_thread WHERE thread_forum_id='.$row->forum_id.''; $threads = $db -> prepare($threads); $threads->execute(); $t_row = $threads -> fetch(PDO::FETCH_OBJ); $num_of_t = $t_row->total_threads; $threads=null; $up_forum = 'UPDATE forum SET forum_threads=?, forum_replies=?, forum_lastpost_user =?, forum_lastpost_date =?, forum_lastpost_thread =? WHERE forum_id ='.$row->forum_id.''; $up_forum = $db->prepare($up_forum); $up_forum->execute([$num_of_t, $num_of_p, $post_user, $last_post_date, $last_post_thread]); $up_forum=null; } $update=null;
  3. Hi. I dont want to create a new topic, so im writing in this one, with the same problem. Im adapting forum into a website and I have a problem with latest date row. I want to add latest post, and i thought i could search for it in database table by MAX command. Is it proper way to whrite sql statement like i am doing?I get that kind of an error: Uncaught PDOException: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s) Here is my code: $topic = 'SELECT f.*, u.selected_character, (SELECT COUNT(post_entry) number FROM forum_post WHERE post_thread = f.thread_id), (SELECT post_user, post_datestamp FROM forum_post WHERE post_thread = f.thread_id AND post_datestamp=(SELECT MAX(post_datestamp) FROM forum_post)) FROM forum_thread f LEFT JOIN accounts u on f.thread_author = u.id WHERE f.thread_id = :topicid ORDER BY f.thread_lastpost_date'; $topic = $db -> prepare($topic); $topic -> bindValue(':topicid', $topic_id, PDO::PARAM_INT); $topic ->execute(); while($row = $topic -> fetch(PDO::FETCH_OBJ)) { echo" <tr> <td style='width:5%; text-align:center' class='forumheader2'><img src='../images/forum/nonew.png' alt='' title='' style='border:0' /></td> <td style='width:55%' class='forumheader2'><a href='index.php?pages=forum/view_topic&id=".$row->thread_id."'>".$row->thread_name."</a><br />by <a href='forum_viewforum6512.html?11'>".$row->selected_character."</a> » ".ucwords(strftime('%a %b %d %Y, %I:%M%p ', $row->thread_author_date))."</td> <td style='width:10%; text-align:center' class='forumheader3'>".$row->number."</td> <td style='width:10%; text-align:center' class='forumheader3'>".$row->thread_views."</td> <td style='width:20%; text-align:center' class='forumheader3'> <span class='smallblacktext'>".$row->post_datestamp."<br />".$row->post_user." <a href='forum_viewtopic4232.html?64400.last'><img src='../images/forum/post2.png' alt='' title='' style='border:0; vertical-align:bottom' /></a></span> </td> </tr> "; }
  4. Hi, maybe someone has this statistics script? Players online time? Does the time in datase at onlinetime cell is writen in miliseconds?