Create a shell script to run sqlite commands from php in ubuntu?

! /bin/bash `sqlite3 ex3. Db "create table t1(f1 integer primary key,f2 text)"` should work I think, unfortunately, not able to check right now.

If it won't work try to remove the ` quotes around the statement.

1 You don't need the backticks inside a shell script unless you want to capture the command's output in a variable. OTOH, you can give SQLite small chunks of SQL via the command line like that and it will still work with the backticks. You'd probably want to use the standard input for more complicated chunks of SQL though.

– mu is too short Apr 21 at 8:21 1 This worked for me...without ` thanks Vlad Khomich.. – Roopa Apr 23 at 4:40.

You want to feed your SQL DDL commands to SQLite through the standard input: #! /bin/bash echo 'create table t1(f1 integer primary key,f2 text);' | sqlite ex3.db.

One more way to accomplish this can be using SQL_ENTRY_TAG_N #! /bin/bash sqlite3 mydatabase.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions