Random results and other adventures...
I am fairly new to mysql and am using it with PHP, and I am curious to know...
- how can i retrieve random results from a search. ie, if a search yields 10 results, but i only want to choose 3 random results, how can i do this?
also...
- when searching a database, how can i check to see if a field has a value? For instance, using:
SELECT * FROM table WHERE name=.... and only retrieve results for where 'name' has a value.
i appreciate any assistance you could offer...
thanks!