getting data from sql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

getting data from sql

Post by psychotomus »

i have a table

Code: Select all

$sql[] = "CREATE TABLE " . $table_prefix . "favorites(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), user_id INT(7), game_id INT(6))";

and i want to extrat the data from it where game_id is different from one another? How could this be done.
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Try articulating what you're trying to accomplish -- I don't understand what you are trying to do
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I think he's looking for a join that'll build a difference list. There is a thread detailing such a method linked from Useful Posts.

I don't see this as a PHP question, so unless there is a PHP question, I'll be moving this to Databases.
Post Reply