php - How to fetch a new result from MySQL during every loop with a keyword? -


I am new to MySQL, so I have a little confusion here. What I'm doing right now is saying a MySql query that gets data from that table where there is a keyword match. The code is right here:

  public function fetch_tags ($ tag) {global $ pdo; $ Query = $ pdo- & gt; Create (say 'text' from `choose *` article_tag 'like'% $ tag% 'or' article_content` like '% $ tag%' "); $ Query-> Executed (); Return $ query- & gt; Fetch (); }   

The problem is that the word previously said is "Michael", and then the next "dextro", both of them will return the exact line because they are the first and last of the same person The name I do not want to achieve the same result twice. How can I make it so that once a special result is received, the next query will not go again to get the same result. They should be separated every time I want them to order from the latest to the oldest.

Any help is greatly appreciated. I think that's actually lost.

OK you can add the $ blacklist parameter, which precedes it Rows will include an array of IDs and will add it to your query: is not a WHERE id (1,2,3) .

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -