Guest User

Untitled

a guest
Jun 24th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. <?php
  2. ## userId ## Name   ##
  3. ##   1    ## Foo    ##
  4. ##   1    ## bar    ##
  5. ##   2    ## foobar ##
  6.  
  7.  
  8. $sql = mysql_query("SELECT * FROM table WHERE userId = 1");
  9. while($x = mysql_fetch_array($sql){
  10.     echo $x["Name"]."<br>";
  11. }
  12.  
  13. /* Ausgabe:
  14.  
  15. Foo
  16. bar
  17.  
  18.  
  19. */
Add Comment
Please, Sign In to add comment