Skip to content

Instantly share code, notes, and snippets.

@pulponair
Created February 2, 2016 15:19

Revisions

  1. pulponair created this gist Feb 2, 2016.
    12 changes: 12 additions & 0 deletions foobar.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    UPDATE
    tx_foo_domain_model_bar s,
    sys_file_reference r,
    sys_file f
    SET
    s.sorting = CAST(SUBSTRING(f.name,6,3) AS UNSIGNED) * 256
    WHERE
    s.record_type=1 AND
    r.tablenames = 'tx_foo_domain_model_bar' AND
    r.fieldname = 'image' AND
    r.uid_foreign = s.uid AND
    r.uid_local = f.uid