Skip to content

Tag: mysql

How to run 2 or more input files in the same form with PHP

I would like to know how to run 2 or more input files in the same form, I have to upload some documents by using php, I made separate forms and they work, but I need to all together however I dont know how. I need to put only two forms as example actually I need to put 3 but

Insert null or something if value of csv is null

I have a problem uploading a csv to mysql. I have the following csv. I need to upload the marked fields the max fields the csv can contain are 48 but some csv contain only 36 or less. I have a form which if csv contains 48 cells uploads succesfully to mysql but if the csv is less than 48

Populating mysql table with json data in phpmyadmin

I have the following example json file and I’m trying to populate a MySQL table with it. Populating books table with json data did not work and with no errors. I want to know what is wrong in the following PHP code: json file looks like this: Mysql table structure looks like this: Table structure Answer…

Checking duplicated data in Laravel

This code work as send to inn_db table from ext_db. but it cannot check if the data is the same or different in inn_db. So there posited same values in inn_db. How could I add that job?. Laravel-5.4, MySQL, InnoDB. Finally, I got the answer as below code with connect view when after discussion. Thanks to @Pra…

Calculation between three different tables in databases?

I am a beginner in programming. There are three tables is in database: tblclients, tblinvoices, tblinvoicepaymentrecords. Now, I want to show Total Due in Client Area, right now there is only Percentage Graph showing. Here is the Flow: I added a client, it goes in tblclients with client id 1. I create invoice…

Laravel 5.4 Combining two collections

So I Have two collections, sales and costs. Now I need them to combine into one collection for my foreach condition (I’m not sure if I can use two collections in one foreach) RAW Queries: Here’s my query for these two collections: Things I’ve tried testing: Converting the collections into ar…