I use a MySQL database as the backend for a particularly large AHK software. I used to declare a query & run it in-line, but to make life easier for myself I created a separate document and just included it into my code. It's a good idea in theory, but it created nightmares in practice. The biggest nightmare is that the query is dynamic. So it's a variable which is comprised of some static data, but also of several other variables.
Example:
Code: Select all
dummySalesPlaceholderSQL =
(
INSERT INTO ``site_Sale`` (``mainID``, ``partialSiteID``, ``siteSalePrice``, ``siteSaleQty``, ``siteSaleDate``, ``dateCollected``)
VALUES('%mainID%', 'NoSalesFound','0.00','0', NOW(),NOW());
)
So, when it was compiled in-line, it was not a problem but when the variable is created upon startup and none of it's child values are yet present, it becomes useless.
Is there any way to get the variable to recreate itself when I need it, thereby discovering the newly created data? I tried these two, but no luck.
jethrow: added code tags ... because we can now