INSERT INTO `analyse`. ![]() The working code looks like this: sheets()) Please ask if you need any more information and thank you for your help. The MySQL database is running on WAMP server. All these cells only have numbers in them (different numbers from 1 to 300, no decimals). The xlsx file we are trying to import is called test. The table we are trying to import to (test) have four colons: Account Number, forstelisten, andrelisten, Account. ![]() VALUES('".$accountnumber."','".$forstelisten."','".$andrelisten."','".$account."')" Īfter running this I get the table and the sheet count and the message at the end but nothing shows up in MySQL database and there are no error messages. INSERT INTO test(Account Number, forstelisten, andrelisten, Account) $accountnumber = isset($Row) ? $Row : '' I try to do it like this, maybe I am missing something. I've tried multiple solutions from stackoverflow but it still does not work. The rest of my PHP script looks like this: sheets()) I am trying to insert PHP variables in a mysql table, where the table name is also a variable, using mysqliquery. I've tried with another account I created which had the username "import" and password "123" and it didn't give any results either. The table we are going to import data to is called "test". MySQL How to use dynamic PHP variables inside INSERT INTO SELECT. I'm using the root account which have no password. Inserting into MySQL using select statement and php variables. The problem is at the last and most important function: importing the data to the local MySQL database. ![]() We then create a table of the data in the file on our page. I've created a page where you can select a file from your computer and "upload" it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |