cycle - the query is breaking. How to skip rows PHP -


I probably have a lame question but I got stuck that I have a DB query

< From the "select" products from where razdel = 'mix' and id = '$ id + 1' and litraj = '$ litri' order IDsc "; $ Reconcert 10 = mysql_query ($ query_recordet10, $ Victor) or die (mysql_error ()); $ Row_reecordset10 = mysql_fetch_array ($ Recordset 10); $ total Rows_Recordset10 = mysql_num_rows ($ Records 10);

The current product ID On the basis of the next answer in the line

But if the next product matches the criteria, 2 or more IDs in the query break my cycle further.

Thank you very much.

Change your query to:

  $ query_recordet10 = "SELECT * from products razdel = 'Mix' and 'id' '$ id' and litraj = '$ literary' order by ID ash border 1 ";  

So you still have 1 row returned (if any Something is back), but You can line up (next to the ID as per ASC according to the ID) (possibly) with an incremental ID line


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -