Return to iWEBTOOL

Go Back   iWEBTOOL Talk > The Web and your Website > Programming > PHP > MySQL
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
Welcome to iWEBTOOL Talk, where you talk about webmaster-related stuff.
 
Discuss topics which interest you.
With over thousands of threads (topics), we're sure you'll find something that'll interest you.
Ask for help whenever you need it.
We have thousands of members who are available to help you if you need it.
It's absolutely FREE!

 1  Register           2  Browse the board           3  Discuss whatever may interest you!
 


Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 03-13-2007, 06:48 AM   #1
pankaj
Newcomer
 
pankaj's Avatar
 
Join Date: Mar 2007
Posts: 2
pankaj is on a distinguished road
Default Sql ?

Whats wrong in the following query -->
Code:
SELECT SUM(bookings),SUM(invoices),SUM(segments),SUM(totalgross),SUM(totalsale),SUM(commission),SUM(tax),SUM(SELECT grossfare FROM salesqww where type="cash adjustments" and aircode="UA") FROM summary WHERE aircode='UA'
pankaj is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
SEO Checklist
Get yourself better ranking with
our "Do-it-Yourself" SEO Checklist.
Click Here
Old 03-13-2007, 03:50 PM   #2
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Sql ?

It's really hard to tell without knowing some details. Are all of the table fields numeric? How are you trying to acess the data that is returned?
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 03-14-2007, 04:30 AM   #3
pankaj
Newcomer
 
pankaj's Avatar
 
Join Date: Mar 2007
Posts: 2
pankaj is on a distinguished road
Default Re: Sql ?

Quote:
Originally Posted by jumpenjuhosaphat View Post
It's really hard to tell without knowing some details. Are all of the table fields numeric? How are you trying to acess the data that is returned?

Yes all the fields are numeric.
pankaj is offline  
Old 03-14-2007, 04:19 PM   #4
kenni
Registered Member
 
kenni's Avatar
 
Join Date: Dec 2005
Posts: 1,543
kenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to behold
Default Re: Sql ?

What error are you getting? Add this code after the section where you submit the query.

Code:
mysql_query("<query-here>") or die(mysql_error());

That should return the MySQL error if there is one.
__________________
Wanna thank someone? Give 'em a rep. More info.
kenni is offline  
Old 03-15-2007, 04:19 AM   #5
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Sql ?

The reason that I'm asking how you are trying to access the data is because you can't access it like you normally would. It would be stored in your array as numbers, ie. $row[0], $row[1], etc. If you are trying to access the information by using $row[bookings] etc, then it won't return the information in the function.
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 03-15-2007, 08:14 PM   #6
mani
Junior Guru
 Contributor 
 
mani's Avatar
 
Join Date: Aug 2006
Posts: 578
mani will become famous soon enough
Default Re: Sql ?

Please pm me with what you are stuck on and i will try to help as much as possible.
__________________
Free Online Addictive Games - Fun flash arcade
Car Specifications - Ultimate Car Guide
mani is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
Webmaster Tools Webmaster Tools Click Here
Closed Thread

(Threads which have no activity for more than 30 days are automatically closed.)



Quick Reply
Message:

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 Off
Pingbacks are Off
Forum Jump


All times are GMT. The time now is 08:41 AM.


Powered by vBulletin v3.6.7 © 2008, Jelsoft Enterprises Ltd. SEO by vBSEO © 2006, Crawlability, Inc.