$q=mysql_fetch_array(mysql_query('SELECT * FROM '.$table.' WHERE user_id='.$g['user_id'].' LIMIT 1'));