Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function quer ( player )
- outputChatBox ( "Query Run...", player, 255, 0, 0 )
- if ( not database ) then
- return outputChatBox ( "Invalid mysql handler" )
- end
- local result = mysql_query ( database, "SELECT * FROM skins" )
- outputChatBox ( "Result: ".. tostring ( result ) )
- if ( result ) then
- local row = mysql_fetch_assoc ( result )
- outputChatBox ( "Row: ".. tostring ( row ) )
- if ( row ) then
- outputChatBox ( row [ "id" ] ..": ".. row [ "username" ] )
- outputChatBox ( row [ "alltextures" ] ..": ".. row [ "allmodels" ] )
- else
- outputChatBox ( "No row" )
- end
- mysql_free_result ( result )
- else
- outputChatBox ( "No result" )
- end
- end
- addCommandHandler("query", quer)
Advertisement
Add Comment
Please, Sign In to add comment