CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Urgent Help needed (SQL - VIEW Problem)

Print topic Send  topic

Author Message
codebang

Posts: 74
Posted: 11/15/2008, 12:52 PM

Dear all...

Well the topic im going to discuss is a bit out of the CCS-php forum.

I need to create a view based on 4 tables from my database.
I know how, but is there a way to tell the view to get the data even if there is no data on one of the columns of the databse tables.

Making it more clear...
I have:
1) tbl_all_jobs.job_number
2) tbl_eor_basic_info.drill_dist
3) tbl_run_no.run_no
4) tbl_equip_failure_rep.failure_no

Now the sql query simple

I want all the data to appear from the first 3 tables but the 4th will be optional, if data was submitted in the first case.

Now this data will then be imported into a database table using the import function, in which I will code insert into table_name values where the above fields.(this method is done using the xml version of a spreadsheet.)
Now when it uploads/imports this excel/xml file into my DB the table with fieldname=failure_no will be by deafult = 0

So the whole idea is to get data out of a view even if there is no data on one of the aforementioned fields.

I hope i have made myself clear.

thank you,

CODEBANG
View profile  Send private message
paulmason411


Posts: 127
Posted: 11/19/2008, 9:51 PM

I would post that on whirlpool as it's not really a codecharge question.

Go here: http://forums.whirlpool.net.au/ and you should get a reply within minutes.

Also one thing I learnt about views which was annoying is that they only work with php 5 and up. So you will need to be sure your hosting supports this.
_________________

http://paulmason.name - Web Development Blog

View profile  Send private message
codebang

Posts: 74
Posted: 11/20/2008, 5:38 AM

man this whirlpool sure is strange....
cant u like give me anything better
View profile  Send private message
mentecky

Posts: 321
Posted: 11/20/2008, 6:06 AM

If you post your current query I can probably help. You need a LEFT join to your table but you haven't given us enough information to write it for you.

Rick

PS: John added a SQL forum for questions like these on CCS Elite. I'm pretty good at SQL and if you post the questions there I will get an email and can answer more quickly.

http://ccselite.com/forums_topics.php?forum_id=14

_________________
http://www.ccselite.com
View profile  Send private message
codebang

Posts: 74
Posted: 11/20/2008, 7:05 AM

just tell me what info u need and i will be glad to upload it up for u.

Are u sure that CCSElite works,,,, i dunno it looks empty...
View profile  Send private message
mentecky

Posts: 321
Posted: 11/20/2008, 7:11 AM

Just send the query you have now. I can add the JOIN stuff for you.

Yes, CCSElite is working, it's just new. But I get an email for every post so I know when people ask questions and can respond quicker.


Rick
_________________
http://www.ccselite.com
View profile  Send private message
paulmason411


Posts: 127
Posted: 11/20/2008, 5:45 PM

Quote :
man this whirlpool sure is strange.... cant u like give me anything better

What is strange about it? Did you try it?

Here is the SQL section, give it a go:

http://forums.whirlpool.net.au/forum-threads.cfm?f=127&g=6
_________________

http://paulmason.name - Web Development Blog

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.