LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-29-2020, 03:16 PM   #1
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Rep: Reputation: 12
PHP script - Sqlite import data from file - How to?


Mysql has LOAD DATA INFILE myDataImport.sql

Sqlite3 command line has .read myDataImport.sql

How is this accomplished in a PHP script? I find no LOAD FILE equivelent.

Thanks for the help.

R
 
Old 03-30-2020, 08:40 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,461

Rep: Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552
Create the database connection, create the LOAD DATA as a query, execute the query.

A simple google search turns up plenty of examples.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] `import modulename' vs. `from modulename import *' rnturn Programming 5 02-18-2016 11:38 AM
Firefox won't import bookmarks in places.sqlite hilltownboy Linux - Software 3 01-14-2013 04:23 PM
LXer: Sqlite-Commander - A ncurses based tool to display the records and tables of a sqlite database LXer Syndicated Linux News 0 01-02-2011 08:11 AM
Import sys ?bash: import: command not found joirnange Linux - Newbie 4 12-28-2004 10:33 PM
Creating CVS repository: cvs [import aborted]: attempt to import the repository enemorales Linux - Software 3 10-15-2004 04:30 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration