You have to call the php script which makes the sql connection and gets the value.
Here: http://livedocs.adobe.com/flex/2/langref/flash/net/URLLoader.html#includeExamplesSummary
The important part is here:
public function URLLoaderExample() {
var loader:URLLoader = new URLLoader();
configureListeners(loader);
var request:URLRequest = new URLRequest("urlLoaderExample.txt");
try {
loader.load(request);
} catch (error:Error) {
trace("Unable to load requested document.");
}
}
And here:
private function completeHandler(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
trace("completeHandler: " + loader.data);
var vars:URLVariables = new URLVariables(loader.data);
trace("The answer is " + vars.answer);
}
In your php script you just have a print at the end:
<?php
$value = Select Statement to get that damn value out of the damn database
print $value;
?>
You will be able to read $value out of loader.data.