Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I have a PHP script that connects to one of my SQL databases and runs a select command. I'm then trying to see what the output is of command but when I f="https://forum.tuteehub.com/tag/echo">echo my results to a file I get "Resource id #f="https://forum.tuteehub.com/tag/5">5" and not a path like I'm expecting. Can anyone tell me where I'm going wrong, I suspect it is the query or the result variable but I'm pretty new to php.
$connection = mysql_connect("127.0.0.1", "user", "f="https://forum.tuteehub.com/tag/password">password"); if(!$connection) { system("f="https://forum.tuteehub.com/tag/echo">echo 'ERROR! Unable to connect to MYSQL' >> /Reports/sqlerror"); } $dbselect = mysql_select_db("mydatabase"); $query = "select p.path from path as p f="https://forum.tuteehub.com/tag/join">join file as f on p.pathid=f.pathid where f.filename like '$xfilename' and p.path like '/Data/original%'"; $result = mysql_query($query); mysql_close($connection); system("f="https://forum.tuteehub.com/tag/echo">echo '$result' >> /Report/sqloutput");
Found the answer. Needed to use mysql_fetch as below.
$query = mysql_query("select p.path from path as p join file as f on p.pathid=f.pathid where f.filename like '$xfilename' and p.path like '/Data/original%'");
$f="https://forum.tuteehub.com/tag/result">result = mysql_fetch_row($query); system("echo '$f="https://forum.tuteehub.com/tag/result">result**[0]**' >> /Report/sqloutput");
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.