techker Posted August 27, 2008 Share Posted August 27, 2008 hey guy im making a car website for my buddy and i have a featured cars on the front page. now in my database i added a field featured im using this SELECT * FROM db WHERE featured ORDER BY RAND() on my page i added 4 boxes with code but i replicates it 4 times each featured car..all i one is 4 diffrent featured cars... Quote Link to comment Share on other sites More sharing options...
bluejay002 Posted August 27, 2008 Share Posted August 27, 2008 am not sure if i get it right but how many featured cars are stored in the field featured? I do not know the structure so I do not know how i can help you. Quote Link to comment Share on other sites More sharing options...
techker Posted August 27, 2008 Author Share Posted August 27, 2008 i got it going.but i need to space them out evenly.. see front page you see fetured cars i want 4 pics. in my admin panel when he adds a car i added a field feature or not. if it is he puts 1 to 5 SELECT * FROM employees WHERE featured ORDER BY RAND() LIMIT 1 , 4 http://canada-auto.com/site/view_test.php Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted August 27, 2008 Share Posted August 27, 2008 I don't get the SQL part where it says "WHERE featured". Quote Link to comment Share on other sites More sharing options...
techker Posted August 27, 2008 Author Share Posted August 27, 2008 featured is the table name.. Quote Link to comment Share on other sites More sharing options...
webent Posted August 27, 2008 Share Posted August 27, 2008 According to your sql statement, isn't "employees" the table name? Quote Link to comment Share on other sites More sharing options...
techker Posted August 27, 2008 Author Share Posted August 27, 2008 sorry the cell name i put this it works put the space between the pics is to mutch? div.thumb { float: vertical; width: 25%; border: thin silver solid; margin: 0.5em; padding: 0.5em; } Quote Link to comment Share on other sites More sharing options...
techker Posted August 27, 2008 Author Share Posted August 27, 2008 i think im getting there.i forgot to close my div tag Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.