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.

CommentFileSizeAuthor
#1 uc_stock.admin_.inc_.txt1.51 KBzwoop

Comments

zwoop’s picture

StatusFileSize
new1.51 KB
zwoop’s picture

hmmm, the proposed SQL query does not seem 100% correct, I'll post a better version soon.

rszrama’s picture

Status: Active » Postponed (maintainer needs more info)

This patch isn't in the right format. http://drupal.org/patch/create

tr’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I 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.