Jump to content

Need help in mysql....


Go to solution Solved by cyberRobot,

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

  • Solution

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.