ambo Posted March 5, 2009 Share Posted March 5, 2009 i am making a game server website and i have a .db on my local driver that will not move or change directories so that being said i have a hosted database i use for the site anyway i can have my site go to local drive and grab data and post to a table in mysql "the Database is sqlite" will that limit me? THanks -ambo Link to comment https://forums.phpfreaks.com/topic/148072-run-a-query-into-a-db-file/ Share on other sites More sharing options...
trq Posted March 5, 2009 Share Posted March 5, 2009 Sorry, Im not sure I understand the question? Link to comment https://forums.phpfreaks.com/topic/148072-run-a-query-into-a-db-file/#findComment-777218 Share on other sites More sharing options...
ambo Posted March 5, 2009 Author Share Posted March 5, 2009 Its a actual file with a .db extension i want to use querys to grab data from it Link to comment https://forums.phpfreaks.com/topic/148072-run-a-query-into-a-db-file/#findComment-777608 Share on other sites More sharing options...
trq Posted March 5, 2009 Share Posted March 5, 2009 Still making little sense. Is the .db file an sqlite database? If so, whats the problem with using the sqlite extension to query it? Link to comment https://forums.phpfreaks.com/topic/148072-run-a-query-into-a-db-file/#findComment-777614 Share on other sites More sharing options...
ambo Posted March 5, 2009 Author Share Posted March 5, 2009 how would i link that query to the file Link to comment https://forums.phpfreaks.com/topic/148072-run-a-query-into-a-db-file/#findComment-777627 Share on other sites More sharing options...
trq Posted March 5, 2009 Share Posted March 5, 2009 <?php if ($conn = sqlite_open('yourdb.db', 0666, $err)) { if ($result = sqlite_query($conn, 'SELECT fld FROM tbl')) if (sqlite_num_rows($result)) { while ($row = sqlite_fetch_array($result, SQLITE_ASSOC)) { echo $row['tbl'] . "\n"; } } } } ?> Link to comment https://forums.phpfreaks.com/topic/148072-run-a-query-into-a-db-file/#findComment-777633 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.