PHP Script Needed Desperately - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-06-2008, 10:46 PM   #1 (permalink)
Junior Member
 
LadyYepperz's Avatar
 
Join Date: Nov 2008
Posts: 6
Unhappy PHP Script Needed Desperately

Actually I need two scripts and they need to be written in PHP.

1. A script to count the number of comments retrieved from mysql db and display the result.
2. A script to add the results of a survey (of which the info is stored in a db) and display the final total.

If you can help me write them or point me in the direction of an example of what i need Id very much appreciate it.
Thanx in advance.
LadyYepperz is offline   Reply With Quote
Sponsored Links
Old 12-14-2008, 08:44 AM   #2 (permalink)
Regular User
 
Join Date: Jul 2005
Posts: 47
Default Re: PHP Script Needed Desperately

1) PHP and MySQL Code:
PHP Code:
<?php
// Make a MySQL Connection

$query "SELECT type, COUNT(fieldname) FROM tablename GROUP BY type"
     
$result mysql_query($query) or die(mysql_error());

// Print out result
while($row mysql_fetch_array($result)){
    echo 
"There are "$row['COUNT(fieldname)'] ." "$row['type'] ." items.";
    echo 
"<br />";
}
?>
2) PHP and MySQL Code:
PHP Code:
<?php
// Make a MySQL Connection

$query "SELECT type, SUM(fieldname) FROM tablename GROUP BY fieldname"
     
$result mysql_query($query) or die(mysql_error());

// Print out result
while($row mysql_fetch_array($result)){
    echo 
"Total "$row['fieldname']. " = $"$row['SUM(fieldname)'];
    echo 
"<br />";
}
?>
sandman is offline   Reply With Quote
Old 12-14-2008, 12:47 PM   #3 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 64
Default Re: PHP Script Needed Desperately

Thanks for posting that Sandman. It is always good to see people getting there problems fixed on a forum. It saves time, money and is helpful to others with the same problems.
specialk is offline   Reply With Quote
Old 12-14-2008, 05:02 PM   #4 (permalink)
Junior Member
 
LadyYepperz's Avatar
 
Join Date: Nov 2008
Posts: 6
Smile Re: PHP Script Needed Desperately

Quote:
Originally Posted by sandman
1) PHP and MySQL Code
Hey thanx Sandman! Im new to PHP & MySQL ... and Im teaching myself. Too bad i had no one to tell me MySQL had its own language and list of commands. I thought MySQL was nothing more than a table holding information and I that everything I was learning was PHP, *sighz* I went to W3 and using their tutorial i was able to easily write my own code... Which is so similar to the one you wrote its scary... lol
But Id like to say thanx and keep dishing out the help. Its really appreciated!
-- LadyYepperz
LadyYepperz is offline   Reply With Quote
Old 12-24-2008, 06:27 AM   #5 (permalink)
lee
Junior Member
 
Join Date: Dec 2008
Posts: 3
Default Re: PHP Script Needed Desperately

here you may download 1800 php scripts. Here is the list:

Ad Management
Affiliate Programs
Blog
Bookmark Management
Calculators
Calendars
Chat Scripts
Classified Ads
Click Tracking
Communication Tools
Content Management
Contests and Awards
Countdowns
Counters
Customer Support
Database Tools
Date and Time
Development Tools
Discussion Boards
Documents
E-Commerce
Education
Email Systems
Error Handling
Exchanges
FAQ and Knowledgebase
File Manipulation
Financial Tools
Flash and PHP
Form Processors
Games and Entertainment
Graphs and Charts
Groupware Tools
Guestbooks
Healthcare
Image Galleries
Image Handling
Interactive Stories
Link Checking
Link Indexing
Mailing List Managers
Multimedia
Music Libraries
Networking Tools
News Publishing
Organizers
Polls and Voting
Portal Systems
Postcards
Quote Display
Randomizing
Redirection
Reviews and Ratings
Search Engines
Security Systems
Server Management
Site Mapping
Site Navigation
Site Recommendation
Software Repository
Tests and Quiz
Top Sites
Unsorted
URL Submitters
Usenet Gateway
User Authentication
User Management
Vertical Markets
WAP and WML
Web Fetching
Web Hosting Tools
Web Rings
Web Search
Web Traffic Analysis
XML and PHP
lee is offline   Reply With Quote
Old 12-24-2008, 06:28 AM   #6 (permalink)
lee
Junior Member
 
Join Date: Dec 2008
Posts: 3
Default Re: PHP Script Needed Desperately

Vip-file.com Hight Quality one click hosting
lee is offline   Reply With Quote
Reply

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

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



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:32 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting