Note that there are some explanatory texts on larger screens.

plurals
  1. POamf php not returning multidimention array
    primarykey
    data
    text
    <p>I have been working on a project using AMFPHP and flash. I did the php stuff only. A function in amf that gets result from 3 tables and store their results in 1 array and returns was working perfectly but for a few days it has stopped. The strange thing is that if I return results separately they work but the final array is never returned and am unable to see any response from AMFPHP call in its test browser.</p> <p>in the code i have mentioned that every point is getting proper result from DB and have tested that from that its retuning result properly.</p> <p>Another thing seems strange is that the partial results I return comes fine but at he start and end thier is something that is not for other functions which are working:</p> <pre><code>(mx.collections::ArrayCollection)#0 filterFunction = (null) length = 6 list = (mx.collections::ArrayList)#1 length = 6 source = (Array)#2 </code></pre> <p><strong>RESULT</strong></p> <pre><code>uid = "8BEDEF32-4BED-E1A4-56A0-F227EDD40026" sort = (null) source = (Array)#2 </code></pre> <p>here is the function </p> <pre><code>function getDefaultValuesForAvatarsLocal($jockey_type=NULL){ $defaultValues = array(); $sql = "SELECT * FROM default_values"; $defaultBLValues = $this-&gt;db-&gt;query($sql); $numRows = $this-&gt;db-&gt;num_rows($defaultBLValues); if($numRows &gt; 0){ $defaultValues['BLP'] = $defaultBLValues; /* IF RETURN THIS GETS RESULT */ if($jockey_type){ $sql = "SELECT jockey_clothing_categories.type, jockey_clothing_items.* FROM jockey_clothing_items JOIN jockey_clothing_categories ON(jockey_clothing_items.category_id = jockey_clothing_categories.id) WHERE jockey_clothing_items.is_default = 1 AND jockey_clothing_items.jockey_type = ". $jockey_type; $defaultJockeyClothings = $this-&gt;db-&gt;query($sql); $numRows = $this-&gt;db-&gt;num_rows($defaultJockeyClothings); } if($numRows&gt;0){ if($jockey_type){ $defaultValues['DJC'] = $defaultJockeyClothings; /* IF RETURN THIS GETS RESULT */ } $sql = "SELECT horse_avatar_clothings_categories.type, horse_avatar_clothings_items.* FROM horse_avatar_clothings_items JOIN horse_avatar_clothings_categories ON(horse_avatar_clothings_items.category_id = horse_avatar_clothings_categories.id) WHERE horse_avatar_clothings_items.is_default = 1"; $defaultHorseClothings = $this-&gt;db-&gt;query($sql); $numRows = $this-&gt;db-&gt;num_rows($defaultHorseClothings); if($numRows&gt;0){ $defaultValues['DHC'] = $defaultHorseClothings; /* IF RETURN THIS GETS RESULT */ #return $defaultValues; /* NOT RETUNING THE FINAL ARRAY FROM THIS POINT EITHER */ }else{ # return false; } }else{ # return false; } #return 1333; /* THE CONTROL COMES HERE PROPERLY BUT NOT RETUNING THE BELOW ARRAY BUT IS RETUNING ANY TEST TEXT LIKE return "I AM HERE"; WILL RETURN THE TEXT PROPERLY */ return $defaultValues; }else{ return false; } } </code></pre> <p>Any help would be appreciated Reagrds</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload