Hy i have a db with 1 collum(with 20rows) i whant to create a custom table view of this database with the sum at the end of the table but with custom search function, i cand find an script to do this for me?

It's a very easy - sum of column "c3" (all rows of table "t1")

SELECT SUM(`c3`) FROM `t1`;

each row sum of columns "c3", "c4", "c5"

SELECT *,(`c3`+`c4`+`c5`) AS `sum` FROM `t1`;

and total sum of columns "c3", "c4", "c5" all rows of table "t1"

SELECT *,(`c3`+`c4`+`c5`) AS `sum`,SUM(`c3`+`c4`+`c5`) AS `total` FROM `t1`;

yes how can i integrate a search function?

seem simply...right not?:))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.