Adding all tables together?
Moderator: General Moderators
- robynprivette
- Forum Commoner
- Posts: 46
- Joined: Sun May 02, 2010 6:22 pm
Re: Adding all tables together?
I know how many entries are in there... I want to show it to other people who use my site.
- robynprivette
- Forum Commoner
- Posts: 46
- Joined: Sun May 02, 2010 6:22 pm
Re: Adding all tables together?
yes i have phpmyadmin. i need the sum to get a total of all the values
Re: Adding all tables together?
If you paste the queries from your script into phpMyAdmin, do you get the expected results?
Try the query I gave you before (repeated here). Do you get the expected result?
Try the query I gave you before (repeated here). Do you get the expected result?
Code: Select all
SELECT
(a.sum + b.sum + c.sum) AS total
FROM
(SELECT SUM(code) AS sum FROM egg ) AS a,
(SELECT SUM(code) AS sum FROM hatch) AS b,
(SELECT SUM(code) AS sum FROM er ) AS c- robynprivette
- Forum Commoner
- Posts: 46
- Joined: Sun May 02, 2010 6:22 pm
Re: Adding all tables together?
No I get this 1e+19
Re: Adding all tables together?
In phpMyAdmin,
- Click the Database: ... link at the top of the page.
- Click the Export tab.
- Uncheck everything except SQL and Structure (and None because it cannot be unchecked).
- Click the Go button.
- Copy-and-paste the CREATE TABLE statements in a reply.