PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$VSI_NUMBER = $myClass->getMySQLValue("VSI_NUMBER");
$L_DN = $myClass->getMSSQLValue("L_DN");
if($VSI_NUMBER == $L_DN)
print("There is a match");
else
print("The fields do not match");
Then for the methods getMySQLValue() and getMSSQLValue(), just do the query to return that row.
The above code assumes you'll only want 1 record from each of the tables. If you have multiple records to return from your SQL queries, it's going to be a bit different.
function getMySQLValue($field) {
$query = "SELECT " . $field . " FROM projects LIMIT 1"; //Or however you would want to do the query
$SQL = mysql_query($query, $db_link);
while($row = mysql_fetch_array($SQL)) {
return $row['".$field."'];
}
}//End Function
Then you would do a similar function for the MSSQL field, but use the proper fetch_array.