Selecting more fields with the same fieldname
#5

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
I'm not a MYSQL Expert in this stuff: How to select multiple fields, with the same fieldnames. I'd like to find a specific field if I'm using the "WHERE" statement, but then from everyone in the database.
Example: There are two users in the database who have a field: "special" with the same value: 1. I'd like to select those users via MYSQL:
pawn Код:
mysql_query("SELECT `username` FROM `users` WHERE `special` = 1");
This will only detect one username, but I'd like it to select all the usernames in the database who has special with the value 1.

I hope you understand what I mean.
Did you even test that? Because I'm sure that would work as-is. In your code you just need to use a while loop to mysql_fetch_row each row separately.
Reply


Messages In This Thread
Selecting more fields with the same fieldname - by Biesmen - 28.05.2011, 21:37
Re: Selecting more fields with the same fieldname - by SchurmanCQC - 28.05.2011, 21:40
Re: Selecting more fields with the same fieldname - by Fj0rtizFredde - 28.05.2011, 21:43
Re: Selecting more fields with the same fieldname - by Biesmen - 28.05.2011, 21:45
Re: Selecting more fields with the same fieldname - by Vince - 28.05.2011, 22:20
Re: Selecting more fields with the same fieldname - by Haydz - 28.05.2011, 22:25
Re: Selecting more fields with the same fieldname - by Biesmen - 29.05.2011, 13:03

Forum Jump:


Users browsing this thread: 3 Guest(s)