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
Tag: mysql
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…
Import CSV/Excel data into MYSQL database and remove duplicate using codeigniter
Today i came across a functionality where i need to import the CSV/Excel file in to MYSQL database via codeigniter. There is a special requirement from client where he can upload the CSV/Excel file in …
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…
Script timeout passed, if you want to finish import, please resubmit the same file and import will resume
I have a database Un-zipped size 50mb zipped size 7mb So when I try to import the database zipped(7mb) after few minutes it is throwing this error: Script timeout passed, if you want to finish import, please resubmit the same file and import will resume. I have resubmitted it but still not importing total dat…
Is it safe to use the name of a table as a parameter of a php function?
The function searches the $variable named table using SQL as showed here: class Search{ `public function query(){` `SELECT * FROM $tableName` `}` } $object = new Search(); $object-&…
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…
How to count the rows by created date in Laravel query builder?
I am trying to count the rows by created_at like So I can show the client like in 2017-07-10, there are 8 people signed up. In 2017-08-13, there are 5 people signed up or something like that. Here is what I tried, but this is just showing only the number. Answer You could try something like this:
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…