Read ALL data from Mysql Table in one String?

Discussion in 'Plugin Development' started by MarkusE.s., Mar 4, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    MarkusE.s.

    One short Question, how can i get ALL entries of an MySQL Tabel as ONE string
    result.getString(1) gives me only one word..
     
  2. Offline

    Kierrow

    Okay I'm going to explain this to you using a square area.
    If you want an abstract area, you need to use another method
    or figure something out...

    Basically, this is checking if some point is within a rectangle.
    This is pretty easy, as a rectangle (in 2D) is defined by 4 points, like:
    • A (0 | 0)
    • B (2 | 0)
    • C (0 | 1)
    • D (2 | 1)
    This square rectangle has an area of 1 x 2 = 2.
    This by the way is simple geometry...

    Now looking at these point coordinates, the left coordinate is always the x-coordinate,
    the other one is the y-coordinate.
    Now if you have some point P (x | y), all you need to check is
    if the x-coordinate is somewhere between 0 and 2, and if the
    y-coordinate is somewhere between 0 and 1, as these are the boundaries of the square.

    I hope this helped you, even though to fully explain this,
    I should have probably used some image, so sorry about that.

    Kierrow

    EDIT: I should add something here:​
    These coordinates are, in Minecraft, x and z, not x and y.​
     
  3. You only need two points for a rectangle/cube, if they define the edges opposite to each other.
     
  4. Offline

    MarkusE.s.

    Okay Thanks, i think that work good now.

    One short second Question, how can i get ALL entries of an MySQL Tabel as ONE string
    result.getString(1) gives me only one word..
     
Thread Status:
Not open for further replies.

Share This Page