I would like to access multiples in the same database at one time. How could this be done from the following code.
I need to access the same tables 18 more times with a new recordnumber.
Is there a easyer way to do this then the way i have done here.
<?
$connectionsuba = odbc_connect("xxxl","xxx","xxx")
or die("Couldn't connect to datasource.");
$sqlsuba = "SELECT [QuantScore], [QualScore] FROM TblEvaluation where RecordNumber LIKE '%$recordnumber1a%'";
// perform the query
$resultsuba = odbc_exec($connectionsuba, $sqlsuba);
// fetch the data from the database and setup php to form Variables
if(odbc_fetch_row($resultsuba)){
$quan1_1 = odbc_result($resultsuba, 1);
$qual2_1a = odbc_result($resultsuba, 2);
}
odbc_free_result($resultsuba);
odbc_close($connectionsuba);
$quan1_1 = $quan1_1 + $quan1_1 % .0;
$qual2_1a = $qual2_1a + $qual2_1a % .0;
$connectionsuba = odbc_connect("xxxl","xxx","xxx")
or die("Couldn't connect to datasource.");
$sqlsuba = "SELECT [QuantScore], [QualScore] FROM TblEvaluation where RecordNumber LIKE '%$recordnumber2a%'";
// perform the query
$resultsubb = odbc_exec($connectionsubb, $sqlsubb);
// fetch the data from the database and setup php to form Variables
if(odbc_fetch_row($resultsubb)){
$quan1_2 = odbc_result($resultsubb, 1);
$qual2_2c = odbc_result($resultsubb, 2);
}
odbc_free_result($resultsubb);
odbc_close($connectionsubb);
$quan1_2 = $quan1_2 + $quan1_2 % .0;
$qual2_2b = $qual2_2b + $qual2_2b % .0;
?>😃