hmaddy Posted May 9, 2023 Share Posted May 9, 2023 anyone help me or correct the string. foreach (Capsule::table('tblhosting')->where("domainstatus", "=", "Active") && (Capsule::table('tblhosting')->where("packageid", "=", 264) || (Capsule::table('tblhosting')->where("packageid", "=", 265) ->get() as $client) { 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted May 9, 2023 Share Posted May 9, 2023 What are you trying to accomplish? 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted May 11, 2023 Share Posted May 11, 2023 (edited) Hey. Capsule::table('tblhosting') ->where("domainstatus", "Active") ->whereIn("packageid", [264, 265]) ->get() as $hosting Edited May 11, 2023 by pRieStaKos 0 Quote Link to comment Share on other sites More sharing options...
Solution hmaddy Posted May 11, 2023 Author Solution Share Posted May 11, 2023 foreach (Capsule::table('tblhosting')->where("domainstatus", "=", "Active") ->where("packageid", "=", [264,265]) ->get() as $hosting) { 1. when i enter wherein, its not working. when i enter where, its shows only 264 id details 2. $auditdate=$hosting->nextinvoicedate; not working or not transfer any data to new variable. but when i use echo $hosting->nextinvoicedate; its prints the value correctly. how to copy the value to a variable 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted May 11, 2023 Share Posted May 11, 2023 54 minutes ago, hmaddy said: foreach (Capsule::table('tblhosting')->where("domainstatus", "=", "Active") ->where("packageid", "=", [264,265]) ->get() as $hosting) { 1. when i enter wherein, its not working. when i enter where, its shows only 264 id details 2. $auditdate=$hosting->nextinvoicedate; not working or not transfer any data to new variable. but when i use echo $hosting->nextinvoicedate; its prints the value correctly. how to copy the value to a variable $users = DB::table('users')->whereIn('id', [1, 2, 3])->get(); https://laravel.com/docs/7.x/queries#selects 0 Quote Link to comment Share on other sites More sharing options...
hmaddy Posted May 11, 2023 Author Share Posted May 11, 2023 its solved with following commands. foreach (Capsule::table('tblhosting')->where("domainstatus", "=", "Active") ->whereIn("packageid", [264,265]) ->get() as $hosting) { $auditdate=$hosting->nextinvoicedate; = blank data. but <?php echo $hosting->nextinvoicedate . PHP_EOL; ?> works the correct data. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.