I'm sure you're right bpat (you're wiser than me!)
WARNING! Looks can be deceiving!! 😉
SQLite is a well, beefed up trimmed down version of SQL. Basically it adds functionality while decreasing its usage of resources. It's faster, and more flexible. Although relatively new, I haven't used it much, and I'm not sure exactly how to harness its power effectively.
And to answer onse:
You can't use php functions directly; however, you can concatentate the result of functions into the statements. mySQL (or any SQL server for that matter) has its own set of built-in functions for Date handeling, string manipulation and other things. But these are limited in scope and are sometimes more powerful then the PHP equivilant. If harnessed correctly, mySQL can do a lot of the grunt work and PHP would just have to show the results. But the more you give mySQL to do, the longer you have to wait for a response.
I think you asked if you can do something like:
<?php
function foo()
{
// Do something here to calculate or create a new value
}
$query = "SELECT * FROM table WHERE foo()=bar()";
Or something along those lines. While in essence at certain times things like this might work, it's not always guaranteed. And if you meant something like:
$query = "SELECT * FROM table WHERE datecolumn=date('I', time())"
Well, mySQL has functions that are better suited for that type of comparison, and would actually be faster.
So PHP functions can't go into an SQL statement; however, some general PHP functions have SQL counterparts.