yeahPHP Posted May 30, 2008 Share Posted May 30, 2008 I've been looking at this problem for awhile now and thought that posting a tread on a php forum might help me come up with a solution. I've been using mysql_result(); to select one attribute from a mysql table; i still need to do this but i need to do it from a whole table not one particular row. Also I need to be able to store a multiple amount of user ids and access their information so i can echo their details to my website, all these ids are stored in one table and their information in an other. Is there some way i can grab all their ids put them into an array and make a query to get all the user information i need from my other mysql table using mt "id" array? $arr = array(); $msqTbl = mysql_result($qry); while ($row = mysql_fetch_assoc($msqTbl) $arr[] = $row; would something like this do what I'm aiming for? if i get the id and put the all the id values into an array(which i havn't managed to figure out i can only get one users ids into the array). How to i then get each of the values find them on my other tables primary key and return the users details. $sql = ("SELECT * FROM foobar WHERE foo = '$idS' AND status = 'accepted'"); $result = mysql_query($sql,$conn); $i=0 $idF = array_fill(0,$i,$result); the result of this is a returned value from $sql but only a single one, i need every value. Link to comment https://forums.phpfreaks.com/topic/107914-confused-i-need-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.