Page 1 of 1

getting data from sql

Posted: Sat Sep 16, 2006 5:12 pm
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.

Posted: Sat Sep 16, 2006 8:54 pm
by aaronhall
Try articulating what you're trying to accomplish -- I don't understand what you are trying to do

Posted: Sat Sep 16, 2006 8:57 pm
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.