Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ## userId ## Name ##
- ## 1 ## Foo ##
- ## 1 ## bar ##
- ## 2 ## foobar ##
- $sql = mysql_query("SELECT * FROM table WHERE userId = 1");
- while($x = mysql_fetch_array($sql){
- echo $x["Name"]."<br>";
- }
- /* Ausgabe:
- Foo
- bar
- */
Add Comment
Please, Sign In to add comment