11-23-2017, 12:20 PM
Hi,
Just a quick query about retrieving data from the DB.
Normally I would use results() to get the data I want to display. But take the scenario where I want a specific value and do:
$somethingQ = $db->query("SELECT * FROM db WHERE category = 'this'");
$somethingR = $somethingQ->results();
If I try: $somethingR->id, it doesn't give me the data, but if I use first() above it does.
Just wondering how I would structure something to have multiple input text boxes, that return with a value stored in the DB but if changed/updated would be updated to their new value; each item's input would be item[].
Hope that makes sense.
Just a quick query about retrieving data from the DB.
Normally I would use results() to get the data I want to display. But take the scenario where I want a specific value and do:
$somethingQ = $db->query("SELECT * FROM db WHERE category = 'this'");
$somethingR = $somethingQ->results();
If I try: $somethingR->id, it doesn't give me the data, but if I use first() above it does.
Just wondering how I would structure something to have multiple input text boxes, that return with a value stored in the DB but if changed/updated would be updated to their new value; each item's input would be item[].
Hope that makes sense.