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?
Thanks

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?

You can add where clause in this queries or select from stored procedure or view

seem simply...right not?:))

Yes it is!

Be a part of the DaniWeb community

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