Questions tagged as 'while'

1
answer

Help with this exercise c ++: impirment terms of the series [closed]

Write a program that reads an integer n> 0 and prints n terms of the series 4,12,24,40,60 ... It should also print the sum of n     
asked by 06.05.2017 / 16:47
1
answer

jquery function inside while loop

I'm using a library called Jquery Bar Rating for the use of rate with 5 stars, I have comments saved in a table with a rate of 1 to 5 stars each, and those comments I printed them with a while: while($row = mysqli_fetch_assoc($res)): echo...
asked by 19.12.2018 / 00:00
1
answer

Problem with While (mysql_fetch_assoc)

Hi, I'm a programmer who is just starting and I have a problem with While, I'm rescuing a data from an SQL table, so all right, in fact if I do a print_r before the While rescues me without any problem, but when going through the while it does n...
asked by 14.12.2018 / 14:04
0
answers

How to break a while loop?

My while loop, it does not break, the function that I put to break it is ignored, and I would like to know how to fix it. to break when I enter the asterisk. form itertools import cycle; ewe=cycle([0]); Nom_entrada=""; Agenda={}; Bucle_pricipa...
asked by 14.11.2018 / 03:51
0
answers

is it possible to use a loop with this line of code that uses index?

This is the line that I do not know if it can be put in a loop: segunda_m = segunda_m[-1] + segunda_m[-2] + segunda_m[-3] + segunda_m[-4] #abajo esta todo el codigo completo. es simplemente sumar index. #El primero es -1 el segundo es -2 y asi...
asked by 03.11.2018 / 23:19
0
answers

My PHP Script Send incomplete mail with the data of a WHILE

Greetings guys I have a conflict that I explain below: I have the following script <?php $sql2 = "SELECT tarjetas.*, users.nombre, users.email, users.username FROM tarjetas INNER JOIN users ON tarjetas.usuario=users.idusuario WHERE usua...
asked by 01.11.2018 / 19:19
1
answer

use while cycle data in a query outside the cycle

Hello everyone is a bit I understand the title sorry, if what I want is to use a data I get from a query of a while while in another query I'm doing within the same php document this is my while cycle <?php...
asked by 13.09.2018 / 23:28
0
answers

how to put a foreach inside a while

$query4 = $mysqli -> query ("SELECT s.e_mail FROM staff_courses as sc join staff as s on(s.id_staff = sc.id_staff) WHERE sc...
asked by 13.09.2018 / 01:15
1
answer

when clicking on a button shown by while, it only throws data from the first tour of the while, although click on the second button shown

I am starting in php and I occupy shopping cart with sessions, I show the products through the database with a while and in each while there is a button with the id of the product and when I click on the button , calls a function of js where it...
asked by 27.07.2018 / 05:59
0
answers

I'm having a conflict in the while

I'm having a confection in my while where I have a table of categories and the category ej has 10 categories. The problem arises when throwing the id to review since it is thrown to me 2 onwards: <?php mysqli_select_db...
asked by 30.06.2018 / 21:39