Irate Posted September 3, 2013 Share Posted September 3, 2013 The topic title says it all - I have a .©db file (the c standing for cards, but that doesn't change the format) including a complex relationship of cards, their names and their associated images. It is written in SQLite 3 dialect, which I happen to have installed on my PC and also can get it working, but I cannot import the file and work it, somehow. How would I work on importing it? Thanks in advance for any support. Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/ Share on other sites More sharing options...
trq Posted September 3, 2013 Share Posted September 3, 2013 What do you want to import it into? Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1447964 Share on other sites More sharing options...
Irate Posted September 4, 2013 Author Share Posted September 4, 2013 Anywhere, but, have it be specific, into either a CSV or a new table on my XAMPP pMA. Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448114 Share on other sites More sharing options...
trq Posted September 4, 2013 Share Posted September 4, 2013 So.. where exactly are you stuck? Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448116 Share on other sites More sharing options...
Irate Posted September 4, 2013 Author Share Posted September 4, 2013 Generally everything, I have the components but I cannot quite properly figure out the format the file is in right now (I didn't write the file), I also never have used SQLite much... I excuse if this sounds a bit... illiterate, but I haven't been able to access the internet properly in the course of the last three days so I couldn't quite look up the documentation for it. Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448145 Share on other sites More sharing options...
trq Posted September 4, 2013 Share Posted September 4, 2013 Do you just want access to this sqlite db file? Is that what you are actually asking? PHP ships with an sqlite extension: see http://php.net/sqlite More specifically take a look at http://php.net/manual/en/function.sqlite-open.php. Once you have the opened the database, you can execute sql queries against it. Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448188 Share on other sites More sharing options...
Irate Posted September 4, 2013 Author Share Posted September 4, 2013 Good, exactly what I was looking for. I will report back here if anything goes wrong. Kudos anyway. Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448190 Share on other sites More sharing options...
trq Posted September 5, 2013 Share Posted September 5, 2013 Good, exactly what I was looking for. You probably should have mentioned that then. The title of your thread is very misleading. Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448206 Share on other sites More sharing options...
Irate Posted September 5, 2013 Author Share Posted September 5, 2013 Yeah, I was in a hurry to get this finished at school, I'll try better next time. However, both my localhost and my online host give me an error for an undefined function call whenever I try to use sqlite_open. Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448246 Share on other sites More sharing options...
trq Posted September 5, 2013 Share Posted September 5, 2013 Have you tried the sqlite3 extension or PDO? Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448263 Share on other sites More sharing options...
Irate Posted September 5, 2013 Author Share Posted September 5, 2013 I guess I tried using the sqlite3 extension, though I am not sure if I needed to install anything else on my localhost or on my PHP host, seeing as I am very limited with time lately. Would PDO work without installing anything additional? Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448275 Share on other sites More sharing options...
trq Posted September 5, 2013 Share Posted September 5, 2013 If you are so limited for time, why not try reading the manual instead of asking your questions here and waiting for a reply? It would be a lot more efficient. http://php.net/manual/en/ref.pdo-sqlite.php Quote Link to comment https://forums.phpfreaks.com/topic/281816-sqlite-3-importing-db-file/#findComment-1448382 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.