Skip to content

Hosting sql files directly inside the database #438

Answered by lovasoa
pchemguy asked this question in Q&A
Discussion options

You must be logged in to vote

Hello !

  • You can host files in the database just by creating and populating the following table
CREATE TABLE sqlpage_files(
  path VARCHAR(255) NOT NULL PRIMARY KEY,
  contents BLOB,
  last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
  • Can I host some files on disk and some in the database? Yes
  • If yes, what is the search logic? serve the local file first, if not found, serve from the db

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@lovasoa
Comment options

@amrutadotorg
Comment options

@lovasoa
Comment options

@amrutadotorg
Comment options

@lovasoa
Comment options

Answer selected by pchemguy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants