Hi everyone!
i am creating array with mysql query results
-------------------------------------------------------------------------
function user_info()
{
dbconnect();
$query = "SELECT * FROM models";
$result = mysql_query($query);
$number_of_users = mysql_num_rows($result);
if ($number_of_users == 0)
{
return false;
}
$result = result_to_array($result);
return $result;
}
---------------------------------------------------------------------------------
then when i create array is show correct
========================
Array ( [0] => Array ( [0] => 1 [id] => 1 [1] => SUSANNAH BOURNE [full_name] => SUSANNAH BOURNE [2] => 1000000002 [spotlight_no] => 1000000002 [3] => [playing_age] => [4] => [height] => [5] => [waist] => [6] => [chest] => [7] => [collar] => [8] => [dress_size] => [9] => [bra] => [10] => [eye_colour] => [11] => [hair_colour] => [12] => [hair_style] => [13] => [hair_length] => [14] => [head] => [15] => [hip] => [16] => 1 [main_image_id] => 1 ) [1] => Array ( [0] => 2 [id] => 2 [1] => Soheil Ghaffari [full_name] => Soheil Ghaffari [2] => 0 [spotlight_no] => 0 [3] => [playing_age] => [4] => [height] => [5] => [waist] => [6] => [chest] => [7] => [collar] => [8] => [dress_size] => [9] => [bra] => [10] => [eye_colour] => [11] => [hair_colour] => [12] => [hair_style] => [13] => [hair_length] => [14] => [head] => [15] => [hip] => [16] => 2 [main_image_id] => 2 ) )
===============================================
but when i do want to query from another table in same database
i want to query where id="$row[][main_image_id]" so i want to get from array only where is $row[?][main_image_id] or $row[?][16]
$row[i dont know what to write in here][main_image_id]
//thanks if you can help
i am creating array with mysql query results
-------------------------------------------------------------------------
function user_info()
{
dbconnect();
$query = "SELECT * FROM models";
$result = mysql_query($query);
$number_of_users = mysql_num_rows($result);
if ($number_of_users == 0)
{
return false;
}
$result = result_to_array($result);
return $result;
}
---------------------------------------------------------------------------------
then when i create array is show correct
========================
Array ( [0] => Array ( [0] => 1 [id] => 1 [1] => SUSANNAH BOURNE [full_name] => SUSANNAH BOURNE [2] => 1000000002 [spotlight_no] => 1000000002 [3] => [playing_age] => [4] => [height] => [5] => [waist] => [6] => [chest] => [7] => [collar] => [8] => [dress_size] => [9] => [bra] => [10] => [eye_colour] => [11] => [hair_colour] => [12] => [hair_style] => [13] => [hair_length] => [14] => [head] => [15] => [hip] => [16] => 1 [main_image_id] => 1 ) [1] => Array ( [0] => 2 [id] => 2 [1] => Soheil Ghaffari [full_name] => Soheil Ghaffari [2] => 0 [spotlight_no] => 0 [3] => [playing_age] => [4] => [height] => [5] => [waist] => [6] => [chest] => [7] => [collar] => [8] => [dress_size] => [9] => [bra] => [10] => [eye_colour] => [11] => [hair_colour] => [12] => [hair_style] => [13] => [hair_length] => [14] => [head] => [15] => [hip] => [16] => 2 [main_image_id] => 2 ) )
===============================================
but when i do want to query from another table in same database
i want to query where id="$row[][main_image_id]" so i want to get from array only where is $row[?][main_image_id] or $row[?][16]
$row[i dont know what to write in here][main_image_id]
//thanks if you can help