Jump to content

PaulSonny

Banned
  • Posts

    204
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by PaulSonny

  1. This looks amazing! Thanks @Aminirus
  2. I second what Digital and Nate have said... ...plus with a combination of some javascript. (I know you said you can turn it off, but your average user won't). I.e disable the button on click and wait for the request to go through.
  3. I like it; probably more than I do the normal view. Reminds me of the Unread Content screen which I always use.
  4. The trophies look great, I see i've already earnt 2 of them! Whoop! Thanks Liz!
  5. I am offering a $20 discount from now until Monday 5th June for all TGL members. Inbox me if you wish to buy a license.
  6. My vote is for also for @Nate for similar reasons as given above, regular contributor and is eager to get involved.
  7. I used to use Visual Studio in my day job doing ASP.NET/MSSQL development work. These days I use Notepadd++ - cant go wrong with a basic editor.
  8. Cybura's profile says they have not been online since May 5th so may be some time before they reply, if they even return. May I ask what the programming was for? I may be able to help?
  9. In a jam so if you're in any need of a programmer for your project(s) please get in touch.
  10. Hello, The majority of these images have been used on a site previously but I no longer have a use for them since the site closed down. The ones that come with PSDs have a canvas sizes that ranges from 160px by 160px to 320px by 320px. ** Red Potion Sold!
  11. Great work - the changes are definitely for the better in my opinion.
  12. Welcome Jackie - glad you decided to join us.
  13. Great addition, can't wait to see more!
  14. Thanks @Nate - your kind words are appreciated. It's been updated today, it has better mobile/tablet support with decent scaling. Updated sound button and a muted sound button so you can tell its muted. Added a game font that makes the overall look and feel much better. I hope you all enjoy it.
  15. Introduction This is the second tutorial in my ‘MySQLi for Beginners’ series. If you haven’t already done so I would recommend starting with Part 1. MySQLi for Beginners Part 1 Prepared Statements Prepared statements can be complex to get your head around at first, but they’re really useful and can help remove a lot of potential issues when escaping user input. Prepared statements essential work by placing a ? where you want to substitute in user input, whether it be string, integer, blob or double. Prepared statements substitute the value into the SQL query so the issues with SQL injections are mostly removed. Define a Statement Let’s assume we want to write a query that returns all of the usernames from the users table where they have a name of Paul. Firstly, we’d define the SQL that we’re going to use: $sql = $db->prepare("SELECT `username` FROM `users` WHERE `name` = ?"); As you can see, that question mark is were we’re going to by assigning the name ‘Paul’ to. Bind Parameters We are going to use the bind_param method to bind a parameter to the $sql object. You must specify the type as the first parameter and then the variables as the second parameter. For instance we’d use ‘s’ as the first parameter for string, and the $name variable as the second parameter. $name = 'Paul'; $sql->bind_param('s', $name); If you have multiple parameters to bind which are of varying types we do the following: $name = 'Paul'; $age = '29'; $sql->bind_param('si', $name, $age); Please note the types are not separated like the variables are. Execute the Statement To execute the statement we would do the following. Not a lot to it really. $sql->execute(); Iterating over results To iterate over results we would first bind the result to variables, this can be done using the bind_result() method which allows us to specify the variables to assign the results to. If we assign the returned ‘username’ to to the variable $returned_username we’d do the following: $sql->bind_result($returned_username); Doing exactly as before, if you have multiple variables to assign to, you are able to comma separate them. Once you have bind the result variables, you want to go ahead and fetch the results. This is as simple as I have done in my MySQLi for Beginners tutorial – we’d use the fetch() method, which returns the values into the binded variables. while($sql->fetch()){ echo $returned_username . '<br />'; } Close $sql Once you are finished with your sql statement, it’s good practise to free the result to keep your code neat, clean and lean! $sql->free_result(); In my next MySQLi Tutorial I will cover MySQLi Transactions. This tutorial and more like it can be found on my company website: P S Web Solutions Ltd.
  16. Welcome to TGL - i'm glad you decided to join us!
  17. I think it's a great idea - always exciting to read what's coming!
  18. It's got to be the Summer?! I hate the cold (i.e winter) and love nothing more than a beer in the back garden in the hot tub with the sun beating down! Then as it cools down get the BBQ on the go!
  19. I'm in the UK, England. In the north east in a town called Middlesbrough. About 3 hours from you @Nate
  20. Hello and welcome to TGL - thanks for joining us. I'd love to know how you heard about us?
  21. I also have a Twitter for my company if anyone is interested. https://twitter.com/PSWebSolLtd
×
×
  • Create New...