Hypens in DB data returning substrings

Posted 8 months ago by jdc1898

I have a dataset that stores SKU's in a table (10107686-1282-CS-500) but when I return this column from the database it only returns (10107686) and I can't figure out why. What is odd is that if I dump the returned object, the SKU appear correct.


    [attributes:protected] => Array
            [sku] => 10107686-1282

the column name is (sku) in the table and I am accessing it by $data->sku

What am I doing wrong here?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.