I am using following code
$con=mysql_connect('localhost','admin',"password");
$db=mysql_select_db('DbName',$con);
$query="SELECT COUNT(shuffel.clientid) as total_users FROM shuffel";
$result=mysql_query($query);
$total=mysql_fetch_array($result);
$total =$total['total_users'];
if($total>=2)
{
$result=$total/2;
$length =round($result);
if ($length > 10)
$length = 10;
for($i = 0; $i < $length; $i++)
{
$data = "SELECT * FROM shuffel ORDER BY RAND() LIMIT 2";
$shuffeluser = mysql_query($data);
int count = 0;
while($row = mysql_fetch_assoc($shuffeluser))
{
$my_array[] = $row;
count ++;
}
}
Now i want to get something like
$firstUserId = $my_array[0]->id;
However Everhthing just returns empty.
What is wrong in above code