Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8120087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:00:38+00:00 2026-06-06T05:00:38+00:00

I have a problem. I have two sqlite files and I need (with PHP)

  • 0

I have a problem. I have two sqlite files and I need (with PHP) to make a join on both of these databases. So first I would like to attach them together but I don’t know how to do that.

Here’s my tiny script :

class PA_SQLModel extends SQLite3
{
    function __construct($name)
    {
        $this->open($name);
    }
}

$firstDB = new PA_SQLModel('firstDB.sqlite');
$secondDB = new PA_SQLModel('secondDB.sqlite');

Thanks for your help !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:00:39+00:00Added an answer on June 6, 2026 at 5:00 am

    yes that’s pretty is how you can acess the both sqlite databases from one php script, but i believe you can’t make a JOIN query, since its 2 different databases, two different resources, and each time you have to query the databases you must use 1 resource.
    so only option i think is left in PHP which can process the results , let’s say arrays from query1 in resource#1 and query2 in resource#2 , you can merge/slice/push/pop and generally manipulate the array to get desired result.

    one more option is to copy all tables from X database to Y and use prefixes like fDB_users, sDB_users, this will solve the name conflicts, and give you the option to run complex queries instead of manipulating the results of queries in php.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a problem designing a SQLite query, i have two tabels, the first
I have a bunch of SQLite db files, and I need to merge them
Suppose I have two database files a.sqlite and other one is b.sqlite. suppose table1
I Have two problem in this Case : I want to pass a JSON
I have a problem with two Textviews on the same height in a RelativeLayout
I have problem with scanf and two strings. char city1[11], city2[11]; for(int i =
I have problem when I tried to update two tables in one Store Procedure
I have a problem with merging two projects compiled separately. I created some classes
I have had this problem w/ two seperate WYSWYG editors in my rails application
I have an strange problem using two borders. I use them to display video

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.