View Single Post
Old 12-19-2021, 04:08 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,055
Quote:
Originally Posted by Publisher Bucks View Post
So i have a table that contains a range of columns, some of them fill the entire set of rows, some of them have say, 10 items in the column, while I have 25 rows.

This is the querie that I am using to display the data:



I understand why its only displaying blank fields in some areas of my PHP coding (because its randomly pulling row data that doesnt exist in a column), however, how would I change the above querie to FORCE data to be displayed for a specific column, whether its full or only 1/2 full with data?

Hopefully, that makes sense?
If the empty fields are nulls then

Select field-name from table where field-name is no null order by rand() ....

Would work. If there are blank fields that are not null then

Select field-name from table where field-name>'' order by rand() ...

should work

.
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote