+ 5
Where do I write SQL in a PHP or HTML document?
Hopefully this is an easy to answer question. Where do I write my SQL in PHP or HTML documents? I know SQL, but I cannot figure this out. Is it between an opening and closing tag, or is this even possible? Any help is appreciated.
8 Réponses
+ 3
In w3schools a lot of what you want to know is covered. There is documentation on how to create a database, enter records, obtain records, update records, etc. You do not necessarily need to use phpMyAdmin, you can use other clients to run MySQL and you can even create everything through scripts.
https://www.w3schools.com/php/php_mysql_intro.asp
+ 3
Mickel Sànchez, thanks so much! This REALLY helps! I just bought a book that goes into deep PHP, and JavaScript. It also teaches basic SQL, but I didn’t know where to write it. Thanks again! 😊
+ 3
No problem. Good luck with your book!
+ 3
Thanks! Hopefully it’ll teach me much more advanced JavaScript and PHP than here. I feel both of those languages lacked much of their uses in the SL lessons.
+ 1
You don't write SQL in html document.
You can write them in php file. Depending on what you want to achieve.
But for query you can go to phpMyAdmin.
+ 1
Okay, thanks guys!
+ 1
You would write it in php and use one of the database connection drivers to then make a query of the database with the SQL string you wrote. It would pass results back and you would parse them in php as well.