![]() |
|
[PHP] Could someone translate my MySQL PHP file to a MySQLI PHP file? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183) +---- Thread: [PHP] Could someone translate my MySQL PHP file to a MySQLI PHP file? (/showthread.php?tid=4349816) |
Could someone translate my MySQL PHP file to a MySQLI PHP file? - jamesgates1 - Jul 20, 2014 I have a simple select MySQL query which i need to transfer to MySQLI. I would also need to have prepared statements. If anyone could help me please reply or PM me. Thanks, James. * - matty9 - Jul 20, 2014 Ctrl-R "mysql_" with "mysqli_". How to use prepared statements: http://php.net/manual/en/mysqli.quickstart.prepared-statements.php * - La Manifesto - Jul 20, 2014 You wouldn't learn a thing if someone changed it for you. Change it yourself. * - Lumia - Jul 20, 2014 I would Love to but i don't use mysql or mysqli ,i only use PDO in my websites. * - Haxalot - Jul 20, 2014 (Jul 20, 2014 11:35 AM)Lumia Wrote: I would Love to but i don't use mysql or mysqli ,i only use PDO in my websites. If you can't help, then why bother posting? (Jul 20, 2014 10:23 AM)jamesgates1 Wrote: I have a simple select MySQL query which i need to transfer to MySQLI. I would also need to have prepared statements. Try it yourself, and if you get stuck then post back here. You'll learn a lot more by trying to do it yourself than just getting someone else to do it for you. * - Vource - Jul 20, 2014 Trial, and error is the best remedy for these sort's of problem's. Did our parent's teach us to use computer's the way we use them now? No. We taught ourselves via the vast information span that was already available upon release of what we now call the "Internet". If you are still stuck after trying to do it yourself please feel free to drop me a PM, and I'd be glad to help you out. Good luck, and Best wishes. ~Vource :Blackhat: * - jamesgates1 - Jul 20, 2014 I appreciate the replies and understand i need to learn for myself but i have already tried 3 times on stack overflow with people showing me different methods. What i want to do is to receive a JSON output of all output records but currently all i receive is: "string(3) "the" string(81) "SELECT `ID`, `NewsStory`, `Summary1`, `Summary2` FROM `Articles` WHERE `Tags` = ?"". If you could give me an explanation with the edits then that would help me to understand. PHP Code Thanks, James. * - MineSQL - Jul 20, 2014 (Jul 20, 2014 03:04 PM)jamesgates1 Wrote: I appreciate the replies and understand i need to learn for myself but i have already tried 3 times on stack overflow with people showing me different methods. What i want to do is to receive a JSON output of all output records but currently all i receive is: "string(3) "the" string(81) "SELECT `ID`, `NewsStory`, `Summary1`, `Summary2` FROM `Articles` WHERE `Tags` = ?"". If you could give me an explanation with the edits then that would help me to understand.You just said that its people showing you methods on stack overflow, that doesn't sound like trying to learn for your self... This code you posted is the oop method used in mysqli. I would go with procedural if your moving from mysql_* functions. * - jamesgates1 - Jul 20, 2014 (Jul 20, 2014 03:55 PM)MineSQL Wrote: You just said that its people showing you methods on stack overflow, that doesn't sound like trying to learn for your self... This code you posted is the oop method used in mysqli. I would go with procedural if your moving from mysql_* functions.Oop is seen as the best of the two Thanks, James. |