Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel db table get one columns value

// let's assume user_id is 5

DB::table('attendances')
  ->where('date_only', '=', $newdate)
  ->orderBy('logon','asc')
  ->pluck('user_id');  // "5"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #db #table #columns
ADD COMMENT
Topic
Name
7+4 =