03-30-2017, 02:20 PM
Definitely id. So every single record should have a column called user_id (associated with that user's id).
So when you are doing your query, it would be something like...
Then would contain a full object/array of all records associated with that user id.
So when you are doing your query, it would be something like...
Code:
$query = $db->query("SELECT * FROM records WHERE user_id = ?",array($user->data()->id));
Code:
$results = $query->results();
Then
Code:
$results