...

View Full Version : Selecting only certain data



Ludatha
02-18-2008, 01:58 AM
Hi, how do I make it so only data with the type column as pictures will be displayed.

In the column 'type' there can either be; Picture, Video, Music or Flash
I only want the rows that contain 'Picture' in the type column to be displayed.


$sql = "SELECT * FROM portal ORDER BY type LIMIT 20";

Thanks :)

oesxyl
02-18-2008, 02:11 AM
Hi, how do I make it so only data with the type column as pictures will be displayed.

In the column 'type' there can either be; Picture, Video, Music or Flash
I only want the rows that contain 'Picture' in the type column to be displayed.


$sql = "SELECT * FROM portal ORDER BY type LIMIT 20";

Thanks :)


$sql = "SELECT * FROM portal where type = 'Picture' ORDER BY type LIMIT 20";

best regards

Ludatha
02-18-2008, 02:23 AM
$sql = "SELECT * FROM portal where type = 'Picture' ORDER BY type LIMIT 20";

best regards

Thanks :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum