I would like to make a join like this. where do i go wrong ?
<?php
for($i=1; $i<=$someValue; $i++){
$allProjectsList = DB::table('user')
->join('firstTable', 'user.id', '=','firstTable.id')
->join('secondTable', 'user.pidm', '=','secondTable.id')
//->where('id', '=', '$anotherValue')
->first();
$anotherValue++;
}
?>
---Update---
This one works nicely but,
<?php
for($i=1; $i<=$someValue; $i++){
$allProjectsList = DB::table('user')
->join('firstTable', 'user.id', '=','firstTable.id')
->join('secondTable', 'user.pidm', '=','secondTable.id')
->where('user.id', '=', '123456')
->first();
}
?>
I would like to use a variable like $x instead of '123456', but it doesn't work. Any suggestions ?