Page 1 of 1

what is this doing?

Posted: Fri Feb 09, 2007 6:00 pm
by psychotomus
Everah | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

$user=mysql_fetch_object(mysql_query("SELECT username,crew FROM users WHERE username='$username'"));

$crew=mysql_fetch_object(mysql_query("SELECT * FROM crews WHERE name='$user->crew'"));


if($user->crew == "0"){

what is the $user->crew doing ?


Everah | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Fri Feb 09, 2007 6:10 pm
by jayshields
It is referencing the crew field from the users table.

Posted: Sat Feb 10, 2007 12:28 am
by psychotomus
what you mean refrenceing?

Posted: Sat Feb 10, 2007 1:00 am
by psychotomus
its just like fetching the row, right?

Posted: Sat Feb 10, 2007 9:32 am
by RobertGonzalez