SQL example for File Upload

SQL example for File Upload

zarzazarza Posts: 7Questions: 3Answers: 0

Hello there,

I was checking the tutorial for https://editor.datatables.net/examples/advanced/upload.html but there is no SQL example and I want to know if it should be there some columns for "'filename' , 'filesize', 'web_path', 'system_path'" as shown in there.

Thank you for any feedback.

Answers

  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin

    Indeed there is - for MySQL the table is:

    CREATE TABLE `files` (
      `id` int NOT NULL AUTO_INCREMENT,
      `filename` varchar(250) NOT NULL,
      `filesize` int NOT NULL,
      `web_path` varchar(250) NOT NULL,
      `system_path` varchar(250) NOT NULL,
      PRIMARY KEY (`id`)
    ) AUTO_INCREMENT=1;
    

    That and the rest of the SQL we use for our demos can be found here.

    Allan

This discussion has been closed.