Migrate/Import entire database from one SQL instance to another

Some if the errors in the php script seem to be due to punctuation in the product names.
Make sure you remove all (") (’) quotes, etc from names.

Good catch! Now I can run the php with zero errors; I just deleted the (’) from two items in the csv file.

SambaPOS looks just fine on the backend, but I’m running into a problem on the POS end. In the POS, whenever I click on “new customer”, type in a name, and click “select customer”, SambaPOS crashes without an error message.

I do not have this problem whenever I use your csv file, so it might be a formatting issue.

I’ve attached my csv file so maybe you can replicate the problem.

I’m going to try running your script on a completely fresh database in the meantime.

update: problem persists on fresh database.

update: i deleted all but 3 rows of my csv file and the POS does not crash. must be a formatting issue, or an issue with the amount of rows. i’ll update when i track it down.

importcsv.zip (1.8 KB)

Do you use commas (,) in your prices ?

Barcode should be blank. You cannot have duplicates.
InventoryQty should be your starting stock level
CostPrice can be zero or blank

Are the products with Portion 1 1/2 oz showing correctly in Product List ?

To address your posts above: The prices do not use commas. I cleared the Barcode and CostPrice columns. The 1 1/2 oz products do appear correctly in SambaPOS.

I’ve finally tracked it down to something definable: if I delete rows 17 and higher (“bacardi light” to “v8”), I do not get the crash.

If I paste in any the 17-77 rows into any of the 1-16 rows, then the POS will crash. With this info, I thought it might be a limitation of 16 rows, but I took your original csv file (from the tutorial attachment) and copied all of your rows down to end up with 21 total rows, and the POS did not crash.

It appears there’s something wrong with my rows 17 and up. I’ll keep digging.

Thanks,
Matt

Sort the spreadsheet by GroupCode and try again.

Just as a test, remove the button colours at the far right. They don’t look right

Having a second look, I’m sure the colours are an issue.

THANK YOU @JohnS! It was the button color all along… I’ve been looking at this screen for 12 hours now and I never considered the color columns! Hopefully this thread will serve somebody else so I didn’t waste your time. Thanks a bunch.

Because the colours were incrementing by 1 due to the way they were copied, you ended up with invalid colour codes. The RGB code must be hexadecimal.