User Tag List

Results 1 to 10 of 10

Thread: Question about SQLite 3 object [tables]

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    May 2007
    Location
    Brazil
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about SQLite 3 object [tables]

    its possible to select and retrieve data from multiple tables?
    using the same .db gile?like:

    select* from "table1","table2"

    and

    edit box 1 -> set text to "text from table 1"
    edit box 2 -> set text to "text from table 2"

    thanks in advance

  2. #2
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    Maybe you should explain a bit more clearly what you want from those tables... If you don't make a join between those two tables, maybe two queries would be better. Or you could use the UNION or UNION ALL operator to append two SELECTs.

    Actually it's pretty hard to say, not knowing what you are trying to achieve...

    If your two tables are to be joined, then your query is probably something like SELECT * FROM tableplayers JOIN tablegames on tablegames.playerid=tableplayers.id

    I don't really understand if you're asking for help in SQL or in MMF-SQlite3 Object.

    PS: if your question is SQLite-related here is the doc : SQLite SELECT doc

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    May 2007
    Location
    Brazil
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    sorry for bad (english) explanation, I know how to select multiple tables but don't know how to retrieve data separately in SQLite 3 object

    which action should I choose?

    thanks in advance

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    Once you managed to select the data you wanted, it doesn't care anymore whether it's from different tables or not. It's all Columns and Rows now. So you'll have to use next row to go to the next record, and get the data from the column you want (columns are 1-based)

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    May 2007
    Location
    Brazil
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    thanks!! I will try when I go home

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    I wasn't home when answering, so here's the expression you'll need :
    Field>Get string from field>FieldString$( "SQLite 3", >Column Number<)

  7. #7
    Clicker Multimedia Fusion 2 Developer

    Join Date
    May 2007
    Location
    Brazil
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    I tried at home but didn't work =/

    if I select 2 different tables and keep changing to the next row, only the text from the first table is displayed....here's what I'm doin':

    SELECT * FROM TABLE1,TABLE2;

    is something wrong?
    thanks in advance

  8. #8
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    Maybe it's me not understanding what you're trying to do, but your query is really strange... Have you tried it outside MMF before ?

    I usually use SQliteManager extension for firefox to test those kind of things.

    Anyway, here are some explanations :
    if you have table1 (id,name) containing :
    1, Attus
    2, Corentin
    3, Yves
    4, François
    and table2 (id,society) containing :
    1,microsoft
    2,clickteam

    then your query would return an array looking like this :
    table1.id,table1.name,table2.id,table2.society
    with values :
    1, Attus,1,microsoft
    1, Attus,2,clickteam
    2, Corentin,1,microsoft
    2, Corentin,2,clickteam
    3, Yves,1,microsoft
    3, Yves,2,clickteam
    4, François,1,microsoft
    4, François,2,clickteam

    (I'm not home, and cannot run precise tests, but you get the idea)
    So if you want to read the second row, use nextrow, and read from the columns you want. So, the data from the second table is columns 3 and 4.

    I guess the query you made isn't the one you need. If it's true you should learn some more SQL.

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    May 2007
    Location
    Brazil
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    ohhh...I got it now, I was changing the rows not the collumns, sorry for being so dumb and thank you!! :p

  10. #10
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about SQLite 3 object [tables]

    Glad you got it to work as expected

Similar Threads

  1. Tables of data?
    By alphabeta279 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 2nd August 2011, 02:42 PM
  2. problem installing sqlite 3 object
    By Bigfoot in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd January 2011, 03:40 PM
  3. 3 Highscores tables on same screen?
    By Pedro Almeida in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th March 2009, 07:07 AM
  4. SQlite object Crash for Byo
    By Corentin in forum File Archive
    Replies: 2
    Last Post: 11th January 2009, 04:03 PM
  5. SQLDB Object - newer versions of SQLite?
    By Dines in forum Extension Development
    Replies: 1
    Last Post: 20th June 2007, 04:35 PM

Posting Permissions

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