Quantcast
Viewing all articles
Browse latest Browse all 75047

Copy Database Row Number to UserData Column by Lt.Ranger.Bob - 2013-07-28

QUOTE (lignumaqua @ July 28, 2013 12:59 am)
FWIW - you can do this all in SQLite very quickly if you first create an index. This should do the same as the original code:

GSK
$_sql = "create index gsak_mem.rows on gridtemp(rid) ; update caches set userdata = (select substr('00000' || gridtemp.rowid, length(gridtemp.rowid) + 1) from gridtemp where rid = caches.rowid) where caches.rowid in (select * from gridtemp)"
$data = Sqlite("sql",$_sql)


Takes just over a second for 50,000 caches.

Image may be NSFW.
Clik here to view.
user posted image

This works great and is very fast. Can a period be added to the end of the end of the number?

Viewing all articles
Browse latest Browse all 75047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>