Important: Not working anymore
I am experiencing a strange problem. I just did a composer update and now the query for the datatables won't return any result anymore, while the query itself is working fine.
The query looks like that:
$query = DB::table('packages')
->join('assigned_packages', function($join) use($id)
{
$join->on('packages.id', '=', 'assigned_packages.registered_package_id')
->where('assigned_packages.customer_id', '=', $id);
})
->select(DB::raw("
registered_packages.*,
registered_packages.created_at as registered_packages_created_at,
registered_packages.updated_at as registered_packages_updated_at,
"));
and for the datatable I do:
if(Datatable::shouldHandle()) {
return Datatable::query($query)
->showColumns('title', 'registered_packages_created_at')
->make();
}
The query is working fine if I do $data = $query->get();, but does not return the desired result anymore if I use it with the datatables. Any idea what the problem could me?
This is really important to me, so your help is much appreciated.
what result do you get instead?
Sadly an empty one, no table results. No idea why :(
Am 25. November 2014 17:28:35 MEZ, schrieb Nils Plaschke [email protected]:
what result do you get instead?
— Reply to this email directly or view it on GitHubhttps://github.com/Chumper/Datatable/issues/185#issuecomment-64427577.
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
Höhere Technische Bundeslehr- und Versuchsanstalt Spengergasse
HTBLuVA Spengergasse 20 1050 Wien Tel.: +43 (0)1 54615 0 Fax: +43 (0)1 546 15-139
www.spengergasse.at
Dieses E-Mail ist vertraulich und kann rechtlich geschützte Informationen beinhalten. Wenn Sie nicht der beabsichtigte Adressat sind, sind Sie nicht autorisiert, diese Nachricht zu lesen, zu drucken, zu speichern, zu verarbeiten oder weiterzugeben. Wenn sie diese Nachricht irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie dieses E-Mail die angeschlossenen Dateien sowie alle Ausdrucke und Kopien. Jegliche Nutzung, Verbreitung, Vervielfältigung oder Offenlegung von einer anderen Person als dem beabsichtigten Empfänger ist strengstens verboten, und kann rechtliche Konsequenzen nach sich ziehen. This e-mail is confidential and may also contain privileged information. If you are not the intended recipient, you are not authorised to read, print, save, process or disclose this message. If you have received this message by mistake, please inform the sender immediately and delete this e-mail, its attachments and any copies. Any use, distribution, reproduction or disclosure by any person other than the intended recipient is strictly prohibited and the person responsible may incur penalties. Thank you!
Temporary workaround would be to do a get and put it into datatable with datatable::collection because atm i do not have any idea either.
But that does not support sorting and searching, right?
Am 25. November 2014 17:41:47 MEZ, schrieb Nils Plaschke [email protected]:
Temporary workaround would be to do a get and put it into datatable with datatable::collection because atm i do not have any idea either.
— Reply to this email directly or view it on GitHubhttps://github.com/Chumper/Datatable/issues/185#issuecomment-64430015.
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
Höhere Technische Bundeslehr- und Versuchsanstalt Spengergasse
HTBLuVA Spengergasse 20 1050 Wien Tel.: +43 (0)1 54615 0 Fax: +43 (0)1 546 15-139
www.spengergasse.at
Dieses E-Mail ist vertraulich und kann rechtlich geschützte Informationen beinhalten. Wenn Sie nicht der beabsichtigte Adressat sind, sind Sie nicht autorisiert, diese Nachricht zu lesen, zu drucken, zu speichern, zu verarbeiten oder weiterzugeben. Wenn sie diese Nachricht irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie dieses E-Mail die angeschlossenen Dateien sowie alle Ausdrucke und Kopien. Jegliche Nutzung, Verbreitung, Vervielfältigung oder Offenlegung von einer anderen Person als dem beabsichtigten Empfänger ist strengstens verboten, und kann rechtliche Konsequenzen nach sich ziehen. This e-mail is confidential and may also contain privileged information. If you are not the intended recipient, you are not authorised to read, print, save, process or disclose this message. If you have received this message by mistake, please inform the sender immediately and delete this e-mail, its attachments and any copies. Any use, distribution, reproduction or disclosure by any person other than the intended recipient is strictly prohibited and the person responsible may incur penalties. Thank you!
It does, it is just slower with 100k rows and more. Searching and ordering is far superior on the collectionEngine.
Alright, I would just pass the result from the query to the collection engine? Does that work, even if it is a complex response from a query with a lot of joins?
Thanks
Am 25. November 2014 17:44:21 MEZ, schrieb Nils Plaschke [email protected]:
It does, it is just a slower with 100k rows and more. Searching and ordering is far superior on the collectionEngine.
— Reply to this email directly or view it on GitHubhttps://github.com/Chumper/Datatable/issues/185#issuecomment-64430478.
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
Höhere Technische Bundeslehr- und Versuchsanstalt Spengergasse
HTBLuVA Spengergasse 20 1050 Wien Tel.: +43 (0)1 54615 0 Fax: +43 (0)1 546 15-139
www.spengergasse.at
Dieses E-Mail ist vertraulich und kann rechtlich geschützte Informationen beinhalten. Wenn Sie nicht der beabsichtigte Adressat sind, sind Sie nicht autorisiert, diese Nachricht zu lesen, zu drucken, zu speichern, zu verarbeiten oder weiterzugeben. Wenn sie diese Nachricht irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie dieses E-Mail die angeschlossenen Dateien sowie alle Ausdrucke und Kopien. Jegliche Nutzung, Verbreitung, Vervielfältigung oder Offenlegung von einer anderen Person als dem beabsichtigten Empfänger ist strengstens verboten, und kann rechtliche Konsequenzen nach sich ziehen. This e-mail is confidential and may also contain privileged information. If you are not the intended recipient, you are not authorised to read, print, save, process or disclose this message. If you have received this message by mistake, please inform the sender immediately and delete this e-mail, its attachments and any copies. Any use, distribution, reproduction or disclosure by any person other than the intended recipient is strictly prohibited and the person responsible may incur penalties. Thank you!
Yes, that should work. Otherwise let me know.