Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Possible duplicate of https://stackoverflow.com/questions...
Close reason: https://chat.stackoverflow.com/sear... - "Too Broad and Unclear"
Yes, I did just take the time to google your problem. Can you please be more specific on what is actually going wrong?
Related Rants
hello i'm trying to do a loop to all of our users account and see if they have already a partner or pair but the problem is after 2 user, the loop just stops and won't loop to all user accounts that's available. Please don't leave me hanging or leaving comments with no solution just like stack overflow.
<?php
$sqlo = mysqli_query($conn, "SELECT `username` FROM users");
$i=1;
$counter = array();
while ($h=mysqli_fetch_assoc($sqlo)) {
$counter[$i] = $h['username'];
$i++;
}
for($i = 1; $i <= Fixed_count($counter); $i++){
$b = $counter[$i];
$query1 = mysqli_query($conn2, "select * from `$b` where username='$newuser'");
$query2 = mysqli_query($conn2, "select * from `$b` where `status`='yes'");
$user1 = array();
$user2 = array();
while($result = mysqli_fetch_array($query1)){
$user1['username'] = $result['username'];
$user1['status'] = $result['status'];
/*more user info*/
while($result2 = mysqli_fetch_array($query2)){
$user2['username'] = $result2['username'];
$user2['status'] = $result2['status'];
/*more user info*/
if($temp_counter < 4){
if($user1['username'] != $user2['username'] && $user1['status'] == "yes" && $user2['status'] == "yes"){
if(/*more condition*/){
/*if condition's are met execute process*/
echo "Success!";
continue 2;
}
}else{
continue 2;
}
}
}
}
}
echo "Loop stopped at user: ".$i;
?>
question
php
mysql