I believe I did it right
Dani, please look over the query and tell me if it is correct, It is working but I want to know that it is the proper way to write it.
mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_OptionValues = sprintf("SELECT ps3_options.OptionID, OptionName FROM ps3_options INNER JOIN ps3_optiongroups ON ps3_optiongroups.OptionGroupID = ps3_options.OptionGroupID WHERE ps3_options.OptionGroupID = %s ORDER BY ps3_options.OptionID ", GetSQLValueString($OGIDParam_OptionValues, "int"));
$OptionValues = mysql_query($query_OptionValues, $PowerStoreConnection) or die(mysql_error());
$row_OptionValues = mysql_fetch_assoc($OptionValues);
$totalRows_OptionValues = mysql_num_rows($OptionValues);