Skip to content
Advertisement

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 I updated the

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

Trying to get property ‘name’ of non-object (View: (…) resources/views/products/index.blade.php)

In table in view with data from products table I am traying to show names from user table but getting this error. I made Laravel relations in models and foreign keys. And added directory in product controller for user model. Error: Trying to get property ‘name’ of non-object (View: /home/laravel/web/laravel.swt101.eu/public_html/abonamenty/resources/views/products/index.blade.php) This is part of my controller for showing product data:

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 what im trying to do.

sql error while trying to store the image to database(UPDATED)

UPDATED: As suggested in comment section I have updated my code and using PDO now. I still have the same error. I am trying to store multiple images to the database (phpmyadmin). When I try to upload it gives an error Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘file.png’ in ‘field list’ My database: I have an database named

Advertisement