Forum Moderators: open

Message Too Old, No Replies

Please help with Dreamweaver

combining recordsets results

         

swanside

6:11 pm on Nov 30, 2007 (gmt 0)

10+ Year Member



Hello all, I found this forum through Google, and I have searched through a load of pages, but I cant seem to find what I need, I did see one part about changing the DATETIME to just DATE and that worked, but, here is my problem.
I have a MySQL database and using Dreamweaver I can create a HTML page with a search box. In the Search box I enter a job number i.e. KN1234 and press submit. I now get a php page with brief details on it about the job number. I now click on the description of the job, and I now go to a results.php page with all the info about that job number. I have several recordsets that display the job order, the person who went to the job, the amount of time spent on the job and any materials used. I now have this problem, I have a table called material, in this table, I have the various fields, Job_No, Quantity, Unit_Price, Additional_Price and Description. Now, in PHPMyAdmin if I put something like;
SELECT Quantity * Unit_Price + (Quantity * Unit_Price * Additional_Cost / 100) FROM `material` WHERE Job_No = 1000980 I get my answer, Additional_Price is a markup on materials it can be anything from 5% to 20% so it is different for each job. If I enter this in my PHP I just get errors.

Please can anybody help. I can do most of the rest such as insert new data and edit exsisting data, I just need to get this so I can start to generate invoices.

Thanks in advance
Paul.

Demaestro

6:46 pm on Nov 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hey swan...

Welcome to WebmasterWorld

Can you be more specific about what error messages you are getting.

Also can you post what the PHP with the select statement looks like?

swanside

11:06 am on Dec 1, 2007 (gmt 0)

10+ Year Member



Well, I dont know, It just worked, as I was going to show you, I thought I would give it another go, and it just worked?

What I now need to do is find out how to prefix the display figures with a £ and round it up, as it displays 23.542753, which I need it to look like £23.54 any advice there would be great.

Thanks
Paul.