Quote:
Originally Posted by sarettah
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
.
|
Thanks,
I've tried both but neither seems to work, the page still displays empty data for some reason :/
Quote:
$sql = "SELECT Culumn FROM Table WHERE Column IS NULL ORDER BY RAND() LIMIT 1";
|
Quote:
$sql = "SELECT Column FROM Table WHERE Column IS NOT NULL ORDER BY RAND() LIMIT 1";
|
The column has 4 rows of data on 20 rows.
All rows are currently 'null' in the table and are also set as 'longtext' (If that matters?)
