/    Sign up×
Community /Pin to ProfileBookmark

Access to MySQL and FireBird simultaneously

Hello everyone) Immediately I say, I’m a beginner who began to study the framework YII2 a week ago) It so happened that after the university without experience and knowledge got to work, where there is a functioning site on YII2 from the MySQL database. I was tasked with writing to the existing site a couple of pages that will output data from the FireBird database. How can I create an additional connection to the FireBird database? I could not figure out how to do it. Can anyone tell how to do this and give a small example of all this?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmJun 19.2018 — Apparently you are not one to go and READ the MANUALS that you need to do before launching on this new adventure.

As for this post's question (among all of your others) - you managed to make one db connection didn't you? So now you simply write the proper code to make a second db connection. Assign the result of each connection to a different php variable and use the appropriate one for the data you want to retrieve.

Pretty simple, eh? Of course if you are really just trying to get someone here to write all of your code for you I'll let the rest of the readers decide how much they wish to help you out.
Copy linkTweet thisAlerts:
@NogDogJun 19.2018 — I'd recommend using the PDO extension, making sure you have the Firebird PDO driver enabled: http://php.net/manual/en/ref.pdo-firebird.php

You can also access MySQL via PDO, allowing you to use the same syntax/methods regardless of which connection you are interfacing with at any point in your code.
×

Success!

Help @22coders spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...