Questions tagged as 'while'

0
answers

Limit Times From While - ArrayIterator

I am making two queries in different tables of the DB to generate a page with different views depending on the result. For this, I am assembling in each query a different While. In fact, one is within the other, inserted in a conditional logic....
asked by 08.01.2016 / 13:26
2
answers

Print results in a feed merging with spaces (blank line) horizontally

I've set up a news feed that reads the information in a bank, but I need instead of each line being printed one after the other, I need an interval between each impression with a blank line to be able to have something like this: printed new...
asked by 04.10.2015 / 23:40
2
answers

While incrementing datetime field in MYSQL

I need to do a while between a start date and an end date, that is, as long as the start date is less than the end date, it will return a query, how can I increment this while to make it run?     
asked by 23.06.2015 / 01:08
1
answer

Loop Error in Inventory Control

<?php $sql = mysql_query ("SELECT * FROM cadastro "); while($resultado = mysql_fetch_array($sql)){ $idrepete = $resultado['id']; ?> #divId<echo idrepete; ?>{ width:100%; } <?php } ?> This is the part that works, now...
asked by 12.02.2015 / 21:37
1
answer

While in While PHP Pdo [closed]

I would like to know how to do a while within another ... Ex. I have Categories and items within the category. Categoria 1 | Item da categoria 1 | Item da categoria 1 Categoria 2 | Item da categoria 2 | Item...
asked by 28.04.2017 / 21:48
1
answer

How do I use an "or" in while in C [closed]

I'm trying to make a naval battle application with which the while stops with 2 conditions, which are the errors or hits of the player, where he can err 5 times and have to hit all points, which in this case is 30. do{ mostrarTabul...
asked by 12.06.2017 / 14:01
3
answers

Start numeric variable with null value in Python

Navigating through the Python web site, I decided to do exercise 1 from the Repetition Structure list: "Make a program that asks for a note, between zero and 10. Show a message if the value is invalid and continues to prompt until the user en...
asked by 17.11.2017 / 19:15
3
answers

variation of while with scanf

Good evening can someone tell me what this code snippet means, since net searching I did not find follows: while(scanf("%d", &variavelA) && variavelA ) Thank you for your attention     
asked by 07.11.2018 / 02:46
1
answer

Null input via keyboard in a variable receipt via JavaScript

Good Night! In my practical experiences in JavaScript, I tried to create a condition to alert the user to a variable that he left unnoticed by pressing the enter key twice. However, trying to solve this problem, I made two attempts: /*Te...
asked by 11.12.2018 / 02:12
1
answer

How to invert the loop result order in PHP? [duplicate]

I wrote a code based on tutorials that I saw to show user information database information in tables but I would like it to reverse the order of the results. How can I do this? <?php // se o número de resultados for maior que zero, mostr...
asked by 09.10.2016 / 17:42