#### Category : mysqli

laravel slowing down over thousand data, when calling general helper. my helper code link is below, please help me if you can thanks. https://wtools.io/paste-code/b58E Sourc..

Here’s my json: [ { "ID": 1, "SOURCEID": 1, "TIMESTAMP": "2020-04-05 07:05:29", "VALUE": "30" }, { "ID": 4, "SOURCEID": 2, "TIMESTAMP": "2020-04-05 07:05:17", "VALUE": "40" }, { "ID": 3, "SOURCEID": 1, "TIMESTAMP": "2020-04-06 12:04:59", "VALUE": "35" }, { "ID": 5, "SOURCEID": 1, "TIMESTAMP": "2020-06-17 12:01:32", "VALUE": "1" }, { "ID": 6, "SOURCEID": 2, "TIMESTAMP": "2021-06-17 ..

I have written this code, yet I don’t know how to update the database after I perform a transaction, based on the product I purchase. Here is the MySQLi, where I think the problem is: <?php $total =$total + ($product[‘quantity’] *$product[‘price’]); mysqli_query($db, "UPDATE product set quantity = quantity-".$product[‘quantity’]." WHERE PRODUCT_ID = ‘".$product[‘id’]."’"); //$db::table(‘product’)->decrement(‘quantity’); ..

I want get full address from latitude and longitude and result will be as a following:- County City District Area/Street Also I want get it by different languages Sourc..

Can I get full address from latitude and longitude and result will be as a following:- County City District Area/Street Also can I get it by different languages Sourc..

Just setting up laravel 8. In the cmd, it’s showing this warning again and again. Laravel is installed and working perfectly but my question is that is this going to be a problem? do I have to install it again? PHP Warning: PHP Startup: Unable to load dynamic library ‘/path/to/extension/mysqli.so’ (tried: /path/to/extension/mysqli.so (The specified module ..

Is it possible to use an array of some sort in the below type of mysql query using PHP? $query = "INSERT INTO$table_name ($table_columns) VALUES($my_array)"; Thank you for your help, KPU Sourc..

I want to perform small task like when you search for a vendor and in your area, within the range of 1km it will show 10 vendors and if 2 of these will change a place then it will show only 8 vendors and while other 2 added another place so whole these things I ..

comments table comments table stars table stars table i write this query: (for ordering sites by most stars_sum) $comments->join(‘stars’, ‘comments.star_id’, ‘=’, ‘stars.id’);$comments->selectRaw(‘comments.site_id as site_id, comments.id as comment_id, stars.key1 + stars.key2 + stars.key3 + stars.key4 + stars.key5 as stars_sum’); $comments->groupByRaw(‘site_id, comment_id DESC’); select comments.site_id as site_id, comments.id as comment_id, stars.key1 + stars.key2 + stars.key3 + .. Read more comments table comments table stars table stars table i write this query: (for ordering sites by most stars_sum)$comments->join(‘stars’, ‘comments.star_id’, ‘=’, ‘stars.id’); $comments->selectRaw(‘comments.site_id as site_id, comments.id as comment_id, stars.key1 + stars.key2 + stars.key3 + stars.key4 + stars.key5 as stars_sum’);$comments->groupByRaw(‘site_id, comment_id DESC’); select comments.site_id as site_id, comments.id as comment_id, stars.key1 + stars.key2 + stars.key3 + ..

I am facing an integrity constraints issue when adding a new row to a table has relation with another table (children and visits tables) every child has many visits. SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (vaccine.visits, CONSTRAINT visits_ch_id_foreign FOREIGN KEY (ch_id) REFERENCES childern (id)) ..

I want to perform small task like when you search for a vendor and in your area within the range of 1km it will show 10 vendors and if 2 of these will change a place then it will show only 8 vendors and while other 2 added another place so whole these things I ..

My app is sending in app notification. using MySQL Tables and listener. but I want to use Push Notification from Firebase. my db is MySQL. I want to send new order notification as soon as an order is created in mysql table. so order gets created in MySQL, if order created successfully, create record in ..

I have model and I am fetching records from that model I want to give admin a view where he can set request timeout for fetching data from that model? but I don’t know what to write in controller? > foreach ($grab_xmlfeed as$feed) { > $Keyword = str_replace("[KEYWORD]",$keyword,$feed->xml_url); >$Ip = str_replace("[IP]",$ip,$Keyword); > $Ua .. Read more I have two tables as customers and transactions. In transaction all the transaction related to customer gets stored. Now i want all the data from customers table and only sum of ‘received amount’as received from transactions table. Below is query$customers = DB::table(‘customers’) ->join(‘transactions’, ‘customers.id’, ‘=’, ‘transactions.custId’) ->where(‘customers.status’, ‘Active’) ->select(‘customers.id’, ‘customers.custName’, ‘transactions.custTotalReceived as Received’) ->paginate(100); ..

I have a problem with the image update feature on vue js using axios. this is the template code section <template> <q-page-container> <transition enter-active-class="animated fadeInLeft" leave-active-class="animated fadeOutRight" appear :duration="700" > <q-page> <q-toolbar elevated class="text-primary"> <q-btn flat round dense icon="arrow_back" @click="$router.push(‘/produk’)" /> <q-toolbar-title> Edit produk </q-toolbar-title> </q-toolbar> <form> <div class="row justify-center"> <p style=" width:90%; margin-top:10px;">Nama barang .. Read more I just installed Laravel on my local Mac after installing ddev, Docker and MAMP. I used https://ddev.readthedocs.io/en/stable/users/cli-usage/#laravel-quickstart guide and everything looked ok. However, when I tried to run a sample code downloaded from the Internet, I started getting the error message Illuminate Database QueryException (2002) SQLSTATE[HY000] [2002] No such file or directory (SQL: select * .. Read more This is table relation$result = Event::select(‘events.*’, ‘events.at as datatime’, ‘events.end_time as endtime’,’event_types.name as event_type_name’) ->from(‘events’) ->leftJoin(‘event_types’, ‘event_types.id’, ‘events.type_id’) ->where(‘events.id’, $id) ->where(‘events.user_id’, 350) ->get() ->toArray(); return$result; i want to change it to eloquent relation. for example, i think we can use with() method instead of select method of query. Sourc..

I got this error ‘Fatal error: Uncaught Error: Class ‘UserController’ not found in /home/dlotjryh/public_html/dashboard/login.php:4 Stack trace: #0 {main} thrown in /home/dlotjryh/public_html/dashboard/login.php on line 4 ‘ just when i upload my file, the page we working fine on my localhost, I checked the php verion, they are both 7.2 <?php include_once ‘classLoader.php’; ?> <?php $userC = .. Read more I am getting very strange issue when I am trying to delete record from a table using below query: delete from user_join_groups where group_id = 1 and user_id = 217; Below is the error that Mysql is throwing: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘test.user_id’ doesn’t exist (SQL: delete from user_join_groups where .. Read more i have tried this to get records matching value 1 in products_applicable column Coupon::whereJsonContains(‘products_applicable’,[‘1′])->get(); how do we get records using dynamic value like$value instead of [‘1’], i have tried this Coupon::whereJsonContains(‘products_applicable’,[$value])->get(); and Coupon::whereJsonContains(‘products_applicable’,$value)->get(); also I want to merge this 2 codes like i want all records having null value at products_applicable and having $value .. Read more My laravel website currently showing this below error. need help! Sourc.. Read more I make a Nested loop which i create a view for show my data. how can i show data of single query in view. This is my View page @foreach($products1 as $item1) <!– first product loop –> <tr> <td>{{++$i}}</td> <td>{{$item1->productname}}</td> @foreach($products2 as $item2) <!– second product loop –> @if($item1->id == \$item2->id) <!– campare with second ..