TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-19-2009, 10:39 AM   #1 (permalink)
The Wanderer
 
Join Date: Aug 2009
Posts: 15
Thanks: 11
tearsofthesun is on a distinguished road
Default Adding two coulmns

I'm trying to get the total post of a user in my forum but my code doesn't work.

PHP Code:
<?php
$query 
mysql_query('SELECT author, post, COUNT(*) FROM forum_posts') or die (mysql_error());
$result mysql_result($query) or die (mysql_error());;
echo 
'$result';
?>
EX: adding author and post = 25 or something like that
tearsofthesun is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Timestamps in SQL? Theo Absolute Beginners 2 08-23-2008 04:27 AM
Adding text to a file.. Tanax Absolute Beginners 2 04-17-2008 05:25 AM
Adding Images to a database from a folder Rendair Advanced PHP Programming 3 01-13-2008 07:40 PM
MySQL Query; Counting and adding values ReSpawN Absolute Beginners 3 12-11-2007 10:07 PM


All times are GMT. The time now is 03:20 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design