Random some item to add on screen.

Hi everyone!

I am newbie, I have a data with some item and I want to display 3 of all on screen. (I use List mobile app)

Could you help me!!!!

Datist wrote:

Hi everyone!

I am newbie, I have a data with some item and I want to display 3 of all on screen. (I use List mobile app)

Could you help me!!!!

 A simple approach I can think of can be to select 3 random records and display those. Something like this should work I guess :  


SELECT  * FROM   Products 

ORDER BY RAND() 

LIMIT 3;


Cheers,

Tushar  

 

Tushar Panpaliya wrote:

Datist wrote:

Hi everyone!

I am newbie, I have a data with some item and I want to display 3 of all on screen. (I use List mobile app)

Could you help me!!!!

 A simple approach I can think of can be to select 3 random records and display those. Something like this should work I guess :  


SELECT  * FROM   Products 

ORDER BY RAND() 

LIMIT 3;


Cheers,

Tushar  

 

 

Hi Tushar Panpaliya,
How to change the query? I don't know :(

Datist 

Datist wrote:

Tushar Panpaliya wrote:

Datist wrote:

Hi everyone!

I am newbie, I have a data with some item and I want to display 3 of all on screen. (I use List mobile app)

Could you help me!!!!

 A simple approach I can think of can be to select 3 random records and display those. Something like this should work I guess :  


SELECT  * FROM   Products 

ORDER BY RAND() 

LIMIT 3;


Cheers,

Tushar  

 

 

Hi Tushar Panpaliya,
How to change the query? I don't know :(

Datist 

 try something like this in advanced SQL  :


The result should be something like :  


Let me know if this suffices your requirement. 


Cheers,

Tushar

 

Tushar Panpaliya wrote:

Datist wrote:

Tushar Panpaliya wrote:

Datist wrote:

Hi everyone!

I am newbie, I have a data with some item and I want to display 3 of all on screen. (I use List mobile app)

Could you help me!!!!

 A simple approach I can think of can be to select 3 random records and display those. Something like this should work I guess :  


SELECT  * FROM   Products 

ORDER BY RAND() 

LIMIT 3;


Cheers,

Tushar  

 

 

Hi Tushar Panpaliya,
How to change the query? I don't know :(

Datist 

 try something like this in advanced SQL  :


The result should be something like :  


Let me know if this suffices your requirement. 


Cheers,

Tushar

 

 

Hi Tushar,

That's great.

I did that, now how to display that data on the screen, Tushar? Help me!!!

Datist