Jump to content

Get highest value in database?


Maurize

Recommended Posts

Posted

So, it works with all the other columns, but not with 'rowid'?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

It could be because you created a column set as "PRIMARY KEY", try removing this column from the table: "id INT IDENTITY( 1,1 ) PRIMARY KEY"

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

nope, seems like the column rowid isn't present..

// found solution for my own.

addCommandHandler( "call", 
function( player, cmd ) 
    local db = executeSQLQuery( "SELECT rowid, * FROM db_data", player ) 
    outputChatBox( "Das Ziel trägt die ID: "..db[1]["rowid"], player, 255, 255, 0 ) 
end ) 

Posted

Maybe "*" doesn't include 'rowid' column.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...