Results 1 to 2 of 2

Thread: Reading and writing singleSRC or uuid (binary data)

  1. #1
    New user
    Join Date
    01-30-17.
    Posts
    5

    Default Reading and writing singleSRC or uuid (binary data)

    I'm getting uuid from FilesModel class (reading table tl_files) and trying to write in singleSRC column in tl_news (using NewsModel class). But the result is different:

    In tl_files, the value for uuid is something like: 0x5ec7706ee70211e69c7d00505694153
    But in tl_news, the value writed for singleSRC is something like: 5ec7706e-e702-11e6-9c7d-00505694153

    Please, how could I read and write this value properly?

    Something like this is not working:

    Code:
    $objNews->singleSRC = $arrFiles[field_for_uploading_file][uuid];
    Last edited by infomiquel; 01/30/2017 at 17:04.

  2. #2
    New user
    Join Date
    01-30-17.
    Posts
    5

    Default

    Finally, I think this is working...!

    Code:
    $objNews = new NewsModel();
    $objFile = new FilesModel();
    $objNews->singleSRC = $objFitxer->findById($arrFiles[picture][uuid])->uuid; // 'picture' is the name of the form field for uploading a file
    Good night!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •