SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is the maximum size of an array. .... sorry I couldn't find it the manual

    Why do need to know.... I want to retreive hundreds possible thousands of
    records from mysql... and display them... but I need to store into a temporary
    space (ie an array) for manipulation like sorting....

    Am I going about this the wrong way?

    THX in advance !!!

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, in answer to the max number of elements of an array, I don't know the answer. my guess is that it is probably the max value of an unsigned int. You might run out of memory before the theoretic limit is reached. But hey, i'm talking through my hat again. I don't know

    What I wanted to ask is this. Are you going to be displaying these hundreds, even thousands of records to the user all at once (in one html page)? If the answer is no, then you should be able to create code that executes MySQL statements that does all the sorting and filtering in the SQL query and only returns a result set which is a sub-set of just the number of records you will need for the page being generated.

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe the array has a limit, the system resources (memory: either physical or virtual)

    It also depends what you store in the array, say each element is 10-page text then it will exhaust the resources faster than one word per element.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •