552 CHAPTER 22 SQLITE sqlite_create_aggregate() boolean sqlite_create_aggregate
552 CHAPTER 22 SQLITE sqlite_create_aggregate() boolean sqlite_create_aggregate (resource dbh, string func, mixed step_func, mixed final_func [, int num_args]) The sqlite_create_aggregate()function is used to register a user-defined aggregate function, step_func. Actually it registers two functions: step_func, which is called on every row of the query target, and final_func, which is used to return the aggregate value back to the caller. Once registered, you can call final_func within the caller by the alias func. The optional num_args parameter specifies the number of parameters the aggregate function should take. Although the SQLite parser attempts to discern the number if this parameter is omitted, you should always include it for clarity s sake. Consider an example. Building on the salary conversion example from the previous section, suppose you want to calculate the total amount of gold employees could collectively purchase:
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.