Jump to content

SQL


` Allawi

Recommended Posts

السلام عليكم ورحمة الله وبركاته

بسم الله الرحمن الرحيم

طلب هو ابي احد يكمل لي المثال التالي

function listPlayersWithMoreMoneyThan(thePlayer, command, amount) 
    local players = executeSQLQuery("SELECT id, name FROM players WHERE money > ?", tonumber(amount)) 
    outputConsole("Players with more money than " .. amount .. ":", thePlayer) 
    for i, playerdata in ipairs(players) do 
        outputConsole(playerdata.id .. ": " .. playerdata.name, thePlayer) 
    end 
end 
  
addCommandHandler("richplayers", listPlayersWithMoreMoneyThan) 

وشكرا لكم

Link to comment
اسم الجدول = {} 

جربت طريقتك والديبوق نفسه ماتغير شي

executeSQLQuery("CREATE TABLE IF NOT EXISTS players (id, name, money)") 

ضبط بس الرساله الثانيه ماتطلع اللي فيها playerdata.id, playerdata.name

الكود باقي ناقص ؟

اذا هو ناقص اتمنى احد يكمله لي وشكرا

Link to comment

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...