Jump to content

Recommended Posts

Hi,

 

I am going to make a website, but have hit a hurdle very early on. this is the bit with the problem:

 

grid of 100x100 is displayed to a user. when one of the cells are clicked the cell changes colour. this info will then be added to the mysql db and also the username of who clicked. so i would need a mysql database containing 10,000 entrys.

 

and in turn this data will need to be displayed on a single page.

 

how long would the query take. is it possible? should i do it? is there a better way to do it?

Link to comment
https://forums.phpfreaks.com/topic/128052-10000-querys-safe/
Share on other sites

The basic data that represents picked/not-picked would be stored and transfered as packed data using the fewest bits per location. If only one bit is used (picked), this would only take 1250 bytes of information.

 

If you were interested in displaying who picked any location, you would perform a separate query that gets that information on an as needed basis, using the coordinates of the requested location.

Link to comment
https://forums.phpfreaks.com/topic/128052-10000-querys-safe/#findComment-663168
Share on other sites

In case the OP is still working on this.

 

I prototyped some javascript code to dynamically create the div's for something like this and it takes a significant amount of time to do this for 10,000 div's.

 

A more effective way to try this would be to dynamically create an image on the server that shows the data and simply output this image and use it in the browser either as an image based submit button or as an image map (using one overall region, not 10,000 different regions) and then just use the coordinates where it was clicked on to update the data on the server, regenerate the image and output it again.

Link to comment
https://forums.phpfreaks.com/topic/128052-10000-querys-safe/#findComment-666107
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.