homepage Welcome to WebmasterWorld Guest from 54.211.68.132
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
mysql sum with php and pdo
Sub_Seven




msg:4592312
 12:38 am on Jul 12, 2013 (gmt 0)

Could anyone be so kind and tell me how to sum numbers using mysql, php and pdo, I cannot seem to find anything online that will help me.

This is my mysql connection:

<?php $data = $conn->query("SELECT SUM(purchaseAmount) FROM orders WHERE status = 3 AND YEAR(datePaid) = YEAR(CURDATE()) AND MONTH(datePaid) = MONTH(CURDATE())"); ?>


But that's as far as I've gotten.

Thanks.

 

Sub_Seven




msg:4592314
 12:49 am on Jul 12, 2013 (gmt 0)

Oops, I got it, it's the same as regular old PDOless connections, I was drowning in a glass of water :-|

My bad...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved