Jump to content

run a query into a .db file


ambo

Recommended Posts

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

<?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";
      }
    }
  }
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.