• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Correct way to pass Variables to mysql!

Participant ,
Dec 04, 2011 Dec 04, 2011

Copy link to clipboard

Copied

Ok so im trying to save data from me flash builder to mysql database!

I have the database, i created the php file to handle the call and i tested it in flash builder and it all works with all variables getting added to the database

When i send a long list of variables to the database from flash builder it says one variable was expexted

So i created a ValueObject called VOClients instantiated the object and set all the values within it

I then call the php Script with the ValueObject and i get no errors

i have traced all  variables with in the object and all variables are set correctly

But when i look in the data base only the first two variables get added and the rest are NULL

Talk about do my head in lol  and the funny thing is i know im doing something stupid

any advise

import valueObjects.VOClients;

           

           

           

            protected function addNewUser():void

            {

               

                var ClientData:VOClients = new VOClients();

               

                ClientData.ClientsFname = ClientFname.text;

                ClientData.ClientsLname = ClientLname.text;

                ClientData.ClientsDayofbirth = ClientDay.labelDisplay.text;

                ClientData.ClientsMonthofbirth = ClientMonth.labelDisplay.text;

                ClientData.ClientsYearofbirth = ClientYear.labelDisplay.text;

                ClientData.ClientsCountryCodes = comboBoxClientCountry.selectedItem.CountryCodes;

                ClientData.ClientsTown = ClientTown.text;

                ClientData.ClientsGender = ClientGender.labelDisplay.text;

                ClientData.ClientsAviator = ClientAviator.labelDisplay.text;

                ClientData.ClientsDescription = ClientDescrip.text;

               

               

                customerService.createClients(ClientData);

                trace("Add client data " + ClientData.ClientFname + " " + ClientData.ClientTown + " " + ClientData.ClientDayofbirth + " " + ClientData.ClientCountryCodes);

And is the test data important! as i had to fiddle with it for ages to get it to work

{

fname:"jon",

lname:"kiss",

dateofbirth:10,

monthofbirth:09,

yearofbirth:1975,

country:"uk",

town:"chelsea",

gender:"male",

Aviator:"devil",

comments:"work you barstead"

}

Hope you dont mind having a little think for me and just put me back on the right track please

TOPICS
PHP

Views

627

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 05, 2011 Dec 05, 2011

Copy link to clipboard

Copied

LATEST

Ok as all ways in my sleep i remembered that i should check the Network Monitor, so i have and it says

Body could not be parsed as validXML/AMF/JSON

Any one have any suggestions please

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines