Jump to content

Need help in mysql....


subhomoy

Recommended Posts

hello every one

 

I have some queries in mysql command..

 

I have a table schema like this

 

id | name | url | img1 | img2 | img3 | img4|

 

I want to randomly rotate the image by specific id....

 

suppose the select the id = 1, then the four images will be rotated randomly for with the tha id (i.e id = 1)

 

Any help wil greatly appreciated

 

Thank u.....

Link to comment
https://forums.phpfreaks.com/topic/289192-need-help-in-mysql/
Share on other sites

suppose the select the id = 1, then the four images will be rotated randomly for with the tha id (i.e id = 1)

 

Are you looking to randomly choose one of the images to display? If so, you could load the four images into a PHP array and then use array_rand() to pick the random image.

http://www.php.net/array-rand

Link to comment
https://forums.phpfreaks.com/topic/289192-need-help-in-mysql/#findComment-1482830
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.