Skip to content
Advertisement

Tag: mysql

Trying to upload files to a folder and to the database

I am trying to upload files to a given folder and to the database using PHP. Files are uploading to the folder successfully but don’t update the database. I can’t find the issue of that. Please help me to solve the problem. ?> This is a screenshot of the table that I am trying to update. screenshot Answer Are there

count multiple values in multiple column PHP

i want to count multiple values from 3 columns and sorted descending using PHP mysqli, and I can’t do it. name1 name2 name3 mike jack rose jack mike Mary jack Mary John expect output: My code: Answer Use UNION to get them all into a single column. Then use COUNT(*) and GROUP BY:

Sorting array in alphabetical order in php

I have a set of data in DB and I am sending it to my Android App using an API function. I have written this in PHP. I want to sort JSON array in alphabetical order and then send it in JSON array format. Here is the code I have, I am not sure how or where to sort this

Laravel – query to join tables in Many to many relation

I have the below tables posts – id – name categories – id – name category_post – post_id – category_id Post.php Category.php A post may contain many categories. I want to query all posts related to the categories of any given post in the least number of database queries. For example, If a post belongs to three categories, I want

Search result from other pages

I created a table that displays the values ​​from the my mysql table. Then, using the tutorial, I created pagination system. Top of page: Bottom of page: Then I created a search engine (input) with onkeyup=”myFunction()” and MyFunction looks: My problem appears when I try to search for something – it searches only from 1 page, and from other pages

Advertisement