Copy
Moderator: General Moderators
-
Straterra
- Forum Regular
- Posts: 527
- Joined: Mon Nov 24, 2003 8:46 am
- Location: Indianapolis, Indiana
- Contact:
Code: Select all
sqlite_query($db, "SELECT * INTO clanprofile2 FROM clanprofile");Warning: sqlite_query(): near "INTO": syntax error in c:\ftp\users\straterra\eck\cgi-bin\full1.php on line 32
-
Straterra
- Forum Regular
- Posts: 527
- Joined: Mon Nov 24, 2003 8:46 am
- Location: Indianapolis, Indiana
- Contact:
http://www.hwaci.com/sw/sqlite/omitted.html
That website says to add collumns, you have to copy the current into a temporary table...(ALTER TABLE To change a table you have to delete it (saving its contents to a temporary table) and recreate it from scratch. ) I wanted to copy so that I could add collumns. But, how can I move the current table to a new table when SQLite doesn't support the fricking SELECT * INTO clanprofile2 FROM clanprofile thing...
That website says to add collumns, you have to copy the current into a temporary table...(ALTER TABLE To change a table you have to delete it (saving its contents to a temporary table) and recreate it from scratch. ) I wanted to copy so that I could add collumns. But, how can I move the current table to a new table when SQLite doesn't support the fricking SELECT * INTO clanprofile2 FROM clanprofile thing...
-
Straterra
- Forum Regular
- Posts: 527
- Joined: Mon Nov 24, 2003 8:46 am
- Location: Indianapolis, Indiana
- Contact:
I don't understand what you mean with your first point. But the reason I use SQLite is because it's both smaller and faster than MySQL. Also, it doesn't eat system resources, like MySQL does. I have an older server, so I found SQLite to be quite friendly. This is the only problem I have ever had with SQLite.AVATAr wrote:good point..
1- make a php script.. with select in one table and insert in other
2- why are you using sqllite?
-
Straterra
- Forum Regular
- Posts: 527
- Joined: Mon Nov 24, 2003 8:46 am
- Location: Indianapolis, Indiana
- Contact:
Since I am such a newbie..could you tell me if I am on the right path?
Code: Select all
$result = (sqlite_query($db, "SELECT * from clanprofile"));
foreach ($result as $rst2) {-
Straterra
- Forum Regular
- Posts: 527
- Joined: Mon Nov 24, 2003 8:46 am
- Location: Indianapolis, Indiana
- Contact:
I currently have this
Weird..It only prints like one row..What did I do wrong?
Code: Select all
$result = (sqlite_query($db, "SELECT * from clanprofile"));
$row=sqlite_fetch_array($result);
foreach ($row as $rst2) {
echo $rst2;
}Weird..It only prints like one row..What did I do wrong?