Search results

  1. L

    List by ID in Order !!

    I got the answer.: $sql = "SELECT * FROM usuarios_dados WHERE Usuario='$usuario'"; $result = $conn->query($sql); $num_rows = $result->num_rows; for ($i = 1; $i <= $num_rows; $i++) { $registro = $result -> fetch_assoc(); $sql2 = "UPDATE usuarios_dados SET ID='$i' WHERE...
  2. L

    List by ID in Order !!

    I resolved the problem: The correct code is: $sql = "SELECT * FROM usuarios_dados"; $result = $conn->query($sql); $num_rows = $result->num_rows; for ($i = 1; $i <= $num_rows; $i++) { $registro = $result -> fetch_assoc(); $sql2 = "UPDATE usuarios_dados SET ID='$i' WHERE...
  3. L

    List by ID in Order !!

    Hello... I-m trying to do the following !! Listing data in the table !! I would like....if the list has 4 rows..whetever the ID list is..make the ID list 1 2 3 4 !! Example.....if have a list with ID 1 3 3...make stay 1 2 3 !! Follow the try next: echo "<table class='tabela_dados' border='1'>...
Back
Top