This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
_removed's profile picture

Lua PHP Query Related

Started by _removed, 21 March 2015 - 12:34 PM
_removed #1
Posted 21 March 2015 - 01:34 PM
For one of my new programs, I am using PHP/PDO to connect to a db. I want to prepare 1 statement but use it twice. Would this work?


$username1 = "hello";
$username2="testaccount";
$query = $mysqli->prepare("SELECT amount FROM users WHERE username = ?");
$query->bind_param("s", $username1);
$query->bind_param("s", $userename2);
$query->execute();
DannySMc #2
Posted 24 March 2015 - 03:16 PM
Please note this is a Lua community not a PHP one, I get you seem to be a little obsessed with learning PHP and PDO but please take note that not everyone knows this so you are more than likely not going to get a reply because it isn't related to ComputerCraft / Lua…
Edited on 24 March 2015 - 02:16 PM
_removed #3
Posted 30 March 2015 - 08:18 AM
Now I realize you're right. I only started coding PHP was because I wantedto be like you. Whenever I see any of your HTTP programs, it makes me feel useless. And Stack Overflow give useless - to the pount where I go to other forums asking for help. Anyway, you can lock this thread.
DannySMc #4
Posted 30 March 2015 - 09:34 AM
Dude, I understand man I do, I saw oeed's app store and really wanted to build one, how about you can make some programs, and I can help you if you? Also if you really want I am planning to make a programming team, only a small one so I don't have to keep fixing programs, so we will all use git and you can pull and push code to and from so you can be a part of the team? It doesn't make you useless honestly! Just PM me and I can help!

EDIT: haha stack overflow are rubbish, they moan if your question has too much information or if they feel that you don't know enough, they are rubbish I tell you! :P/>
Edited on 30 March 2015 - 07:36 AM