<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV> </DIV><BR><DIV><DIV>On Oct 13, 2006, at 1:49 PM, Ben Stallings wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">$DQConnections = array(</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>array(</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'type' => 'mysql',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'server' => 'db.example.com',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'name' => 'example_database_name',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'user' => 'example_user',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'passwd' => 'example_password'),</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>array(</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'type' => 'postgres',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'server' => 'postgresql.example.com',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'name' => 'another_example_name',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'user' => 'another_user',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'passwd' => 'another_password'),</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>array(</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'type' => 'access',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'driver' => 'Microsoft Access Driver (*.mdb)',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'path' => 'd:\\northwind.mdb',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'user' => 'Admin',</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS"><SPAN class="Apple-converted-space"> </SPAN>'passwd' => ''));</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">include('cookbook/dataquery.php');</FONT></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>Why not $DQConnections[] = array ();<BR><BLOCKQUOTE type="cite"> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">Not much different than the whole DataStore.</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">You need an identifier though. A nickname. Because what if (gasp) you have multiple mysql databases? ADODB is database agnostic, so use an agnostic method of addressing the database definitions -- then they can be on any server, and multiple of the same type -- or from the same program -- can be used:</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">$DQConnections['moodleA'] = array ();</P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Comic Sans MS; min-height: 16px; ">$DQConnections['moodleB'] = array ();</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Comic Sans MS; min-height: 16px; ">$DQConnections['drupal'] = array ();</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Comic Sans MS; min-height: 16px; ">$DQConnections['mysistersdb'] = array ();</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Comic Sans MS; min-height: 16px; ">$DQConnections['pmwiki'] = array ();</DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px">etc.</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Comic Sans MS; min-height: 16.0px"><BR class="khtml-block-placeholder"></P><BLOCKQUOTE type="cite"> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">It seems to me that this second syntax is actually harder to screw up<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">than the multi-dimensional array.<SPAN class="Apple-converted-space"> </SPAN>But that could just be me, so I'm<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">eager for other opinions.<SPAN class="Apple-converted-space"> </SPAN>Or is there an even simpler syntax I haven't<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">thought of?<SPAN class="Apple-converted-space"> </SPAN>--Ben S.</FONT></P> </BLOCKQUOTE></DIV><BR><DIV>They're not much different from one another, just keep in mind that you do need to give each database setting a unique name.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Crisses</DIV></BODY></HTML>