Hi all,
I’m looking for some assistance with the below:-
I currently have Table A and Table B; within Table A I have a collumn that contains “35 65 79”, for example, the numbers contained therein are each unique rows on Table B. I’m needing to create a method of querying Table B for each of the aforementioned, the quantity of the numbers contained in Table A’s columns can vary so using string[0] string[1] etc is not reliable, I’ve also explored the use of explode and have had little succes.
Please see the below code I’m currently working with:-
[php] $TableAQuery = mysql_query(“SELECT * FROM TableID
WHERE Column
= ‘1’”) or die(mysql_error());
while ($TableAResult = mysql_fetch_array($TableAQuery)) {
foreach ($TableAResult["UniqueID"] as $value) {
$TableBQuery = mysql_query("SELECT * FROM `TableB` WHERE UniqueID = '".$value."'") or die(mysql_error());
$TableBResult = mysql_fetch_array($TableBQuery);
echo $TableBResult["Name"];
}
[/php]
Thanks in advance !