Hi Simon, Thanks for your response. Good point about the preparation, didn't know that.
> On the other hand, the fact that you're numbering tables suggests a badly formed schema. Are you sure you shouldn't merge the tables and move that number to a column inside the table ? Fair question, but I'm doing log analysis. Each set of tables will be for a given server that's being analysed. The application that uses the data is a read-only web-app, so my database needs to be optimised for SELECT queries. I don't anticipate there being many servers in an install so the number of table sets should be small. However the number of rows can be fairly large; I figure this method should offer a small speed up on the potentially larger datasets even if it's not strictly best-practice. That said, I don't suppose there's any option for the other variable ($date_string)? Thanks, Jonathan On 28 July 2014 14:37, Simon Slavin <slav...@bigfraud.org> wrote: > > > On 28 Jul 2014, at 12:41pm, Jonathan Moules < > jonathanmou...@warwickshire.gov.uk> wrote: > > > > *$table_prefix* which will be a number indicating which table set to look > > You can't have variable table names in a prepared statement. The process > which does preparation has to know which table it will be accessing. If > you don't know which table you're be using, you can't use a system like > that. > > On the other hand, the fact that you're numbering tables suggests a badly > formed schema. Are you sure you shouldn't merge the tables and move that > number to a column inside the table ? > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- This transmission is intended for the named addressee(s) only and may contain confidential, sensitive or personal information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users