← prev | next →
noobmaster622 2020-03-26 15:21:15
sedhossein_dev 2020-03-26 13:33:16
How to be a Senior Junior Software Engineer?
https://medium.com/@sedhossein/how-to-be-a-senior-junior-software-engineer-part-1-c205ce51810e
Wat a bullshit
sedhossein_dev 2020-03-26 15:25:38
noobmaster622 2020-03-26 15:21:15
Wat a bullshit
thanks :))
TheGuyi 2020-03-26 15:27:05
TheGuyi 2020-03-26 15:27:35
TheGuyi 2020-03-26 15:27:05
i am trying to return data from two tables -same database but getting the error attached, any solutions..using laravel 5.4 because i am plugging into an old db with data from php 5.6
TheGuyi 2020-03-26 15:30:35
TheGuyi 2020-03-26 15:31:23
public function index()
{
//
$trustee = DB::table(‘trustee’);
$ltd = DB::table(‘limited_company’);
$posts = $ltd->merge($trustee)->paginate(10);
//$posts = DB::table(‘limited_company’)->paginate(10);
return view(‘index’, [‘posts’ => $posts]);
}
TheGuyi 2020-03-26 15:31:35
so how do i fix it
TheGuyi 2020-03-26 15:34:55
I just want to select all data from the tables then pass them to a variable that i can sort which data to return in my view …in SQL this is how the query looks like ::::::::::
SELECT * FROM trustee,limited_company ;
TheGuyi 2020-03-26 15:35:39
no
TheGuyi 2020-03-26 15:36:16
i am creating a search page that searchs sigle entries from both tables
TheGuyi 2020-03-26 15:36:32
i am just displaying the data
TheGuyi 2020-03-26 15:37:17
so i want to display the data from both tables no JOIN… just select from both tables
TheGuyi 2020-03-26 15:37:39
any way i can do that? select from both tables and return to view?
TheGuyi 2020-03-26 15:40:35
help me rearrange this code
TheGuyi 2020-03-26 15:41:10
public function index()
{
//
$trustee = DB::table(‘trustee’);
$ltd = DB::table(‘limited_company’);
$posts = $ltd->merge($trustee)->paginate(10);
//$posts = DB::table(‘limited_company’)->paginate(10);
return view(‘index’, [‘posts’ => $posts]);
}
TheGuyi 2020-03-26 15:51:17
TheGuyi 2020-03-26 15:51:40
TheGuyi 2020-03-26 15:51:17

TheGuyi 2020-03-26 15:52:05
please put in the code i see how it looks?
TheGuyi 2020-03-26 15:52:47
this did not work
TheGuyi 2020-03-26 15:57:31
failed
TheGuyi 2020-03-26 15:58:12
TheGuyi 2020-03-26 15:58:20
TheGuyi 2020-03-26 15:58:12
thats the error
rickyanwar 2020-03-26 16:10:45
#ask i upload laravel to hosting i got no found on my site but when i reload again i got found, the process i looping like that
Gowtham_Boopathiraj 2020-03-26 16:19:32
419 page expired how to redirect a page
iamnomana 2020-03-26 16:28:20
I want the group link please
TheGuyi 2020-03-26 16:37:22
failed
TheGuyi 2020-03-26 16:37:24
TheGuyi 2020-03-26 16:38:08
i have entry_id unique field
biraldino 2020-03-26 16:57:27
How to delete files on the server in Laravel summernote
TheGuyi 2020-03-26 17:00:47
TheGuyi 2020-03-26 17:02:44
this works but only returns 1 value to the front end yet both tables have about 20 records
TheGuyi 2020-03-26 17:03:10
view only returning 1 record
TheGuyi 2020-03-26 17:09:19
but i am not joining the two tables they have different data that is why i just want to list them on a page
TheGuyi 2020-03-26 17:09:38
they have different names but i want them to be listed on one page
TheGuyi 2020-03-26 17:14:52
Show me code pls
TheGuyi 2020-03-26 17:16:51
I know this one so where do I put in laravel
TheGuyi 2020-03-26 17:17:03
Ok
TheGuyi 2020-03-26 17:19:49
SELECT entry_id,name FROM limited_company
UNION
SELECT entry_id,name FROM trustee;
TheGuyi 2020-03-26 17:20:29
SELECT entry_id,name FROM limited_company
UNION
SELECT entry_id,name FROM trustee;
TheGuyi 2020-03-26 17:20:51
that is the sql statement returning the result i want to return
TheGuyi 2020-03-26 17:21:20
that sql is the correct one
TheGuyi 2020-03-26 17:21:54
sorry the other one was trying to explain the table
TheGuyi 2020-03-26 17:23:34
i explained the problem and what i wanted to do in the beginning
TheGuyi 2020-03-26 17:24:47
recall i said no to join
TheGuyi 2020-03-26 17:25:43
please lets do the sql query
TheGuyi 2020-03-26 17:27:59
SQL:::::::::::::
SELECT entry_id,name FROM limited_company
UNION
SELECT entry_id,name FROM trustee;
TheGuyi 2020-03-26 17:34:32
TheGuyi 2020-03-26 17:34:37
done the union
TheGuyi 2020-03-26 17:34:51
TheGuyi 2020-03-26 17:35:00
TheGuyi 2020-03-26 17:34:51
getting this error
← prev | next →