Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. [HELP] how to using array in my case? (Query & PHP)

[HELP] how to using array in my case? (Query & PHP)

Scheduled Pinned Locked Moved Database
phpdatabasedata-structureshelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jimmy suharry
    wrote on last edited by
    #1

    I've some data, there are

    RealData Balance Sort by Desc
    A 684 345 A 684
    B 60 - E 308
    C - - J 302
    D - - I 273
    E 308 - O 178
    F - - H 140
    G 11 - B 60
    H 140 - N 27
    I 273 - Q 22
    J 302 - R 20
    K - - P 14
    L - - G 11
    M - - C -
    N 27 - D -
    O 178 38 F -
    P 14 - K -
    Q 22 - L -
    R 20 4 M -

    Description
    Proc = Process
    Res = Result
    Sort by Desc

    Get 8 row data
    Proc 1 Res 1 Proc 2 Res 2 Proc 3 Res 3 Proc 4 Res 4 Finish for 8 row data
    A 684 657 A 657 635 A 635 621 A 621 610 A 610
    E 308 281 E 281 259 E 259 245 E 245 234 E 234
    J 302 275 J 275 253 J 253 239 J 239 228 J 228
    I 273 246 I 246 224 I 224 210 I 210 199 I 199
    O 178 151 O 151 129 O 129 115 O 115 104 O 104
    H 140 113 H 113 91 H 91 77 H 77 66 H 66
    B 60 33 B 33 11 R 20 6 B 11 - R 6
    N 27 - Q 22 - P 14 - G 11 - B -
    Q 22 22 R 20 20 B 11 11 R 6 6 G -
    R 20 20 P 14 14 G 11 11 P - - P -
    P 14 14 G 11 11 Q - - Q - - Q -
    G 11 11 N - - N - - N - - N -
    C - - C - - C - - C - - C -
    D - - D - - D - - D - - D -
    F - - F - - F - - F - - F -
    K - - K - - K - - K - - K -
    L - - L - - L - - L - - L -
    M - - M - - M - - M - - M -

    Result 1 27
    Result 2 22
    Result 3 14
    Result 4 11

    Total 1 74 (For 8 row data)

    Get 4 row data
    Proc 1 Res 1 Proc 2 Res 2 Proc 3 Res 3 Finish for 4 row data
    A 610 411 A 411 376 A 376 347 A 347 345
    E 234 35 O 104 69 O 69 40 O 40 38
    J 228 29 H 66 31 H 31 2 R 6 4
    I 199 - E 35 - J 29 - H 2 -
    O 104 104 J 29 29 R 6 6 J - -
    H 66 66 R 6 6 E - - E - -
    R 6 6 I - - I - - I - -
    B - - B - - B - - B - -
    G - - G - - G - - G - -
    P - - P - -

    M 1 Reply Last reply
    0
    • J jimmy suharry

      I've some data, there are

      RealData Balance Sort by Desc
      A 684 345 A 684
      B 60 - E 308
      C - - J 302
      D - - I 273
      E 308 - O 178
      F - - H 140
      G 11 - B 60
      H 140 - N 27
      I 273 - Q 22
      J 302 - R 20
      K - - P 14
      L - - G 11
      M - - C -
      N 27 - D -
      O 178 38 F -
      P 14 - K -
      Q 22 - L -
      R 20 4 M -

      Description
      Proc = Process
      Res = Result
      Sort by Desc

      Get 8 row data
      Proc 1 Res 1 Proc 2 Res 2 Proc 3 Res 3 Proc 4 Res 4 Finish for 8 row data
      A 684 657 A 657 635 A 635 621 A 621 610 A 610
      E 308 281 E 281 259 E 259 245 E 245 234 E 234
      J 302 275 J 275 253 J 253 239 J 239 228 J 228
      I 273 246 I 246 224 I 224 210 I 210 199 I 199
      O 178 151 O 151 129 O 129 115 O 115 104 O 104
      H 140 113 H 113 91 H 91 77 H 77 66 H 66
      B 60 33 B 33 11 R 20 6 B 11 - R 6
      N 27 - Q 22 - P 14 - G 11 - B -
      Q 22 22 R 20 20 B 11 11 R 6 6 G -
      R 20 20 P 14 14 G 11 11 P - - P -
      P 14 14 G 11 11 Q - - Q - - Q -
      G 11 11 N - - N - - N - - N -
      C - - C - - C - - C - - C -
      D - - D - - D - - D - - D -
      F - - F - - F - - F - - F -
      K - - K - - K - - K - - K -
      L - - L - - L - - L - - L -
      M - - M - - M - - M - - M -

      Result 1 27
      Result 2 22
      Result 3 14
      Result 4 11

      Total 1 74 (For 8 row data)

      Get 4 row data
      Proc 1 Res 1 Proc 2 Res 2 Proc 3 Res 3 Finish for 4 row data
      A 610 411 A 411 376 A 376 347 A 347 345
      E 234 35 O 104 69 O 69 40 O 40 38
      J 228 29 H 66 31 H 31 2 R 6 4
      I 199 - E 35 - J 29 - H 2 -
      O 104 104 J 29 29 R 6 6 J - -
      H 66 66 R 6 6 E - - E - -
      R 6 6 I - - I - - I - -
      B - - B - - B - - B - -
      G - - G - - G - - G - -
      P - - P - -

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Create a connection to the database (unknown as you did not name it) Create a query to extract the data from the unknown database Put the results of the query in your collection (PHP and is nothing to do with the database) So the only relevant information you have given us is PHP in a DATABASE forum! Find a tutorial about PHP and your unknown database and work through the tutorial. Come back and ask SPECIFIC questions when you have trouble!

      Never underestimate the power of human stupidity RAH

      J 1 Reply Last reply
      0
      • M Mycroft Holmes

        Create a connection to the database (unknown as you did not name it) Create a query to extract the data from the unknown database Put the results of the query in your collection (PHP and is nothing to do with the database) So the only relevant information you have given us is PHP in a DATABASE forum! Find a tutorial about PHP and your unknown database and work through the tutorial. Come back and ask SPECIFIC questions when you have trouble!

        Never underestimate the power of human stupidity RAH

        J Offline
        J Offline
        jimmy suharry
        wrote on last edited by
        #3

        Hi, Mycroft Holmes Thank for reply. You means the data can not using Query (MySQL) but use PHP. Okay I move this forum to Web development. But how to move this topic to Web Development? Thanks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups