-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with arrays please. #5
Comments
Do you want to check for username & password?
You can also use sql.count() to get fetched rows count.. the same as mysql_num_rows from php.. |
The sql['name'] I knew from php to do column names you had to call the On Fri, Aug 12, 2016 at 4:52 AM, Khairul notifications@github.com wrote:
|
Yes it does..
Can be done in gdscript with:
What is returned by db.fetch_array is an array of rows.. CMIIW 😊 |
It wasn't to hard to figure out how to do arrays in php which is the language I am use to. Godot has been pretty fun to use then I found your pluging. It is implemented and I figured out pretty easily how to create a table and insert information into said table. But for the life of me, I can not figure how in godot or gdsqlite how to retrieve items like I do in php from the array. Here is the piece of code I am messing with to try and figure this out.
`func _on_loginbutton_pressed():
if (db.open("user://data.sql") != db.SQLITE_OK):
print("ERR: ", db.get_errormsg())
return
sql = db.fetch_array("SELECT * FROM players WHERE name ='"+str(Globals.get("Playername"))+"';")
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: