The code for producing the Stock table seems fairly suboptimal, doing a SQL query for every SKU. With a site with hundreds or thousand of SKUs, this could be slow. Attached is a suggestion for an alternative. I don't claim to be a PHP programmer, but this code reduces the number of SQL queries dramatically.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_stock.admin_.inc_.txt | 1.51 KB | zwoop |
Comments
Comment #1
zwoop commentedComment #2
zwoop commentedhmmm, the proposed SQL query does not seem 100% correct, I'll post a better version soon.
Comment #3
rszrama commentedThis patch isn't in the right format. http://drupal.org/patch/create
Comment #4
tr commentedI don't know how to evaluate this because the OP never explained what he was trying to do and never followed up on the request to put it into a patch so we could see what he had in mind. So I'm going to close this.