mysql - PHP SQL query id from table with multiple values in rows -


I am assuming a value in which many values ​​need to be queried from the rows, which have a certain value. If "id" is equal to 999, then I use the SQL code below to get the values ​​of the column "group_id". In the "Xx_groupmap" table, ID 999 has been shown three times with different values, below is my table.

  table xx_groupmap ------------------- Id | Group_id ------------------- 999 | 2 999 7 99 9 8 code   

$ Query = "SELECT group_id to xx_groupmap WHERE id = '999'"; $ Db- & gt; SetQuery ($ query); $ Result = $ db- & gt; Load Object List (); So when I want to return three values ​​of ID 99 9, I use this code

  resonate $ t-> Group_id;  

But it only outputs a number. How can I create an array with three values ​​from id 999?

Foreign currency, $ t is always updated, Only get $ t in an array.

  $ id = array (); Foreign Currency ($ result $ $) {$ id [] = $ t- & gt; Group_id; } Var_dump ($ ID);  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -