Skip to content

whats is the best/fastest way to upload images from android to mysql?

whats is the best/fastest way to upload images from android to mysql? the problem that im having that uploading images encoded in base46 that it takes almost 10sec and after 3 or 4 uploads using bitmap the app crashes sometimes because bitmap other because of the encoded images on old android phone.. right no…

Updating stocks quantity in Product Table from Cart

Hello everyone so basically I have this 2 tables ProductLists and Cart Note: Cart table contains temporary datas inside it, if the orders inside cart table are already paid the table itself will truncate. I tried running this query and this happened output any advice on how to do this without making the stock…

Get bitwise and of all elements of an array in php

if i have and array like and i want to do a bitwise add operator for all elements like What will be the logic and how to do it ? Answer This can be achieved with the following one-liner: It uses array_reduce to ‘loop’ over the array, reducing it to one value. The callback function performs the bit…

what is nonce in the api client

I have a API client to make a PHP call. But as a matter of fact the documentation given with the API is very limited, so I don’t really know how to use it. This a part of the API code: I don’t know what is nonce and how does it works. Answer The NIST glossary defines a nonce as

how to convert this block of code into a php version

// Javascript program to check if all array elements are // same or not. // This code is contributed by patel2127 Answer Taking the information from the question previously dealt with here: Check if all values in array are the same I think your function would look like this: array_unique() returns the same ar…

php fatal error handler… failing with no error_get_last() set

I have been using a fatal_handler() function that I expanded on for over a year now but for some reason I now have random errors popping up in the error_log file on the server and triggering the notification. Previous to a little while ago it was working fine. The errors seem to come from the array $error whi…

how to add data to validated request input bag

I need to add custom data to the request input array from my customRequest class I tried this way It’s do the trick with request()->all() but when I returned $request->validated() it’s not exist. how can I do it? Answer $request->validated() is returning only validated data (data in the r…