Page 1 of 1

sql question

Posted: Mon May 17, 2004 11:03 pm
by hward
hi i need to have this return only the mem_userid's that are larger than 30000

Code: Select all

$sql = "SELECT mem_userid, mem_username, mem_email, mem_joindate, mem_sex, mem_country
	FROM $table_name
	ORDER BY mem_userid
	";

Posted: Mon May 17, 2004 11:23 pm
by feyd
WHERE mem_userid > 30000

or similar

Posted: Mon May 17, 2004 11:45 pm
by hward
ok what did i do wrong now

Code: Select all

$sql = "SELECT mem_userid, mem_username, mem_email, mem_joindate, mem_sex, mem_country
	FROM $table_name
	ORDER BY mem_userid WHERE mem_userid > 30000
	";

Posted: Mon May 17, 2004 11:54 pm
by feyd
it may want single quotes around the 30000

Posted: Mon May 17, 2004 11:59 pm
by hward
tried that

Posted: Tue May 18, 2004 12:02 am
by hward
ahhhhhhh

Code: Select all

$sql = "SELECT mem_userid, mem_username, mem_email, mem_joindate, mem_sex, mem_country
	FROM $table_name
	 WHERE mem_userid > '30000'
	 ORDER BY mem_userid
	";