ItHadToComeToThis Posted August 11, 2020 Share Posted August 11, 2020 (edited) Never mind Edited August 11, 2020 by ItHadToComeToThis Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted August 11, 2020 Share Posted August 11, 2020 (edited) While I'm (relatively) versed in PHP (not as comfortable with SQL queries), it's pretty hard to figure this out since I can't inspect/test any of this easily. One thing that sticks out to me though, is that in all of your queries, you assign "$col={$stats}". Is the dollar-sign intentional and actually in the column name? If it's intentional, why? What does rq("database"); return? And shouldn't the query at least be "{$col}={$stats}"? Edited August 11, 2020 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
ItHadToComeToThis Posted August 11, 2020 Author Share Posted August 11, 2020 (edited) The dollar sign in PHP is how you declare a variable as far as I know. $variable = some value $col = rq("database"); is something I need to change, its actually the column name to be modified So the LSL script sends a value pair of "database" as like a key and then a value of say "mainStats" Then in the PHP script its assigned to the variable $col and then that variable is used in place of the column name further down Edited August 11, 2020 by ItHadToComeToThis Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted August 11, 2020 Share Posted August 11, 2020 (edited) 24 minutes ago, ItHadToComeToThis said: The dollar sign in PHP is how you declare a variable as far as I know. $variable = some value $col = rq("database"); is something I need to change, its actually the column name to be modified Right, I was just confused by the inconsistency of that one variable and forgot you can either have the curly braces around it or not. (Depends if it's just a basic variable or a more complex expression.) Does your database have a limit on the content length? Eg. varchar(18) or something. The query itself looks correct to me. Have you tried updating the column with values other than "N/A" as a test? Edited August 11, 2020 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
ItHadToComeToThis Posted August 11, 2020 Author Share Posted August 11, 2020 Yeah I tried a few different things other than N/A and the limit was set to varchar(200) which I increased to 1000 to make sure that wasn't an issue Link to comment Share on other sites More sharing options...
ItHadToComeToThis Posted August 11, 2020 Author Share Posted August 11, 2020 Never mind @Wulfie Reanimator ......I changed the varchar length of the wrong column. That was the issue, fml, dont code when tired. On a plus note, I just spent time re writing it and have it looking much better now 1 Link to comment Share on other sites More sharing options...
Kyrah Abattoir Posted August 11, 2020 Share Posted August 11, 2020 Why removing your question >_< 1 Link to comment Share on other sites More sharing options...
Nick0678 Posted August 11, 2020 Share Posted August 11, 2020 9 hours ago, ItHadToComeToThis said: Never mind Nevermind? Link to comment Share on other sites More sharing options...
Mollymews Posted August 11, 2020 Share Posted August 11, 2020 17 hours ago, ItHadToComeToThis said: Never mind integer tired; function nevermind() { llPlayAnimation("stretch"); llWhisper(0, "/me yawns"); llTriggerSound("yawn", 1.0); llSleep(15.0); llPlayAnimation("lay down"); llSleep(5.0); llWhisper(0, "/me whispers Nevermind!"); llPlayAnimation("snooze"); llTriggerSound("zzzzz", 1.0); } default() { touch_start(integer num) { if(llDetectedKey(0) == llGetOwner()) { if (tired = !tired) llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); else { if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) llStopAnimation("snooze"); } } } run_time_permissions(integer perms) { if (perms & PERMISSION_TRIGGER_ANIMATION) nevermind(); } } 😺 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now