jmr3460 Posted August 31, 2009 Share Posted August 31, 2009 Hello All, I am working on a site that uses .jpg images a lot. I have developed the majority of the admin scripts but I need a little help with one of my queries. My images table has the following fields (id, client_id, vehicle_id, sml_image, lrg_image, feature, del). When I add an account I create a folder for image uploads, then I insert 12 rows of data with the client_id being what the client table id is, then the vehicle_id being what the id is in the vehicle table is. Then I insert for url purposes sml_image1.jpg and increment by one for next rows, the same with the lrg_image.jpg. My home page will require data from one row in the whole table that will have a 1 in the feature column. The first row of each set of vehicle_id's will be my possible feature 1 switch. I want to only select all of the first row of each set of the vehicle_id's. Can someone help? Thanks for any help Link to comment https://forums.phpfreaks.com/topic/172520-solved-select-first-row-array/ Share on other sites More sharing options...
jmr3460 Posted August 31, 2009 Author Share Posted August 31, 2009 Sorry I wasted you guys time. I got it. select * from images where sml_image = 'sml_image1.jpg' and del = 0 Link to comment https://forums.phpfreaks.com/topic/172520-solved-select-first-row-array/#findComment-909474 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.