Skip to content

Tag: sql

How to fix my CRUD not working in Update PHP MSQL

I tried to implement CRUD in m website but I am able to make Create, Read and Delete. However, something went wrong during developing the Update function. Can anyone help me? I will provide the code below. The code is used to update the users information if the logged in person is an Admin. Thank you. Answer …

upload image by refreshing page of web site

i write php code that upload image from client to host and site and my problem is if i refresh the page ,the last file going to upload again and its going dupplicate and if refresh again this problem …

Remove Duplicates in an array in php

My array: I want to be able to echo out the [month] and not have it duplicated, but still associate the other values to the correct month. To get to this point I have done an array_merge to put them together like you see them. Separately they look like this: #1 #2 I have tried array_unique and that does not

Yii2, get an average value from timestamps

I have a basic table with orders, which have a field thats called created_at which is in timestamp format and I want to get the avarage on how many orders have been created per day. Found a other similar qestion about something like mine question whichI have posted below in the hope that everybody understand …