Jump to content

HelpMe100

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

HelpMe100's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I've done that already and it works but i dont want to have to save all my class variables into local variables to put them into the database. The value it gives when going straight in is array[].
  2. Please help me with this problem. I've got a class with an array in it, and some data in the array. I instantiate the class as myArray class, and pass it to a function, the function uses the array in the class as input for a mysql database. The problem is the sql wont input the data. I can insert into the database via sql local variables and local arrays and class variables but not class arrays? if i save the class array to a local variable and insert that into the sql then that works, but it wont go straight in? I imagine this has to do with passing the array by refrence rather than by value as i get "array[]" as the value in the database but i can't be sure. pseudo code: class arrayclass() { var options; options[0]="foo"; } Function insertData(myArray) { //THIS WORKS echo myArray->options[0]; //BUT THIS DOESN'T mysql_query("UPDATE OPTIONS SET bar='myArray->options[0]' WHERE EVER "); } myArray = new arrayClass(); insertdata(myArray); Please help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.