hi, my name is Jamie, newbie of flex.

Im trying to get data from mysql using php.
I successfully got data on combobox,
and even updated to mysql once.
but second time, i can not update.

I got a duplicate entry error....
now, no idea what I can do.

I really really really need a help from anyone who knows anything to 
help me out and get me out from getting error message.

plz plz plz help me...

Im gonna post entire my code below.

thank you.


Jamie.


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute">
<mx:Model id="hlists" source="http://localhost/xampp/req.php"/>
   <mx:ComboBox id="combo" x="22" y="200" 
dataProvider="{hlists.user}" labelFunction="sender_onFault"
        change="onComboChange(event)"/>
<mx:TextArea width="188" height="71" id="outputField" x="167" 
y="178"/>
<mx:Script>
<![CDATA[
 private function sender_onFault(item:Object):String {
        var name:String =item.OperationDetailName;
        return name;
    }
    private function onComboChange(event:Event):void
    {
        outputField.text = combo.selectedLabel;
    }
]]>
</mx:Script>
</mx:Application>




<?php
$con = mysqli_connect("localhost", "root", "", "operationdb1");
mysqli_query($con,"set names 'utf8'");

$Query1 = "SELECT OperationDetailName from operationdetail";

$Result1 = mysqli_query($con, $Query1 );

$Return = "<operationdetail>";
while ( $User1 = mysqli_fetch_object( $Result1 ) )
{ 
$Return .= "<user><OperationDetailName>".$User1-
>OperationDetailName."</OperationDetailName></user>"; 
}
$Return .= "</operationdetail>";

print ($Return);
mysqli_free_result( $Result1 );

print ($Return);
mysqli_free_result( $Result3 );
?>

Reply via email to