Member
Join Date: Jul 2004
|
ponder two ways of connecting to MySQL and querying, which would be better?
1. make a new connection for each query 2. if available, use an existing connection for each subsequent query, ie only making one connection per database does alternative 1 take a lot of extra time or is it negligable? i've been using alt 1 but just thought of how much more logical it seems to make the connection part of a "db object". thoughts, comments? |
quote |
is the next Chiquita
Join Date: Feb 2005
|
Exactly why do you need more than one connection?
Also, do you know whether you want/need a open connection (e.g. your front end is always connected to back end in whole process) or closed connection (e.g. connect to backend only if you are submitting/receiving a request from the SQL backend). |
quote |
Member
Join Date: Jul 2004
|
yea, when i thought of it it seemed like the righgt thing to do. up until now i had a function doing both the connection and the query. and it was used once for each query.
now, your other question regarding back-end etc.. please explain a little further what you mean, i don't really follow you. btw, i'm using php, don't know if it matters, but it's a "run once and close" script as opposed to an application staying open all the time. |
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I need some really good advice right now. | Wickers | AppleOutsider | 21 | 2004-11-27 11:00 |
Klipsch speakers, just how good are they? | stevegong | General Discussion | 22 | 2004-11-11 02:03 |
gimme some of that old time religion | naren | AppleOutsider | 3 | 2004-10-29 11:23 |
Some good earbuds... | ast3r3x | General Discussion | 21 | 2004-10-17 15:08 |
Good gaming headset? | dviant | Third-Party Products | 0 | 2004-06-16 13:13 |