Are we only allowed to create a database within phpmyadmin? Can’t we create a database using a text editor like sublime, then adding the file within our directory (next to the php files) and use php to refer the database? Or must it only be created within a server itself and only accessible through the server? Is there another way to bypass databases? what i mean is implement other forms of storing users and their information or is database the simple and easier way of approaching that specific problem?
Any insist is appreciated it! PHP is understandable but ive never tinkered with MySQL so that is different in its own approach! Thank You!
Could you elaborate more on that? Im not near my laptop no more so i can test it but from what it sounds like, your saying i should download an existing table into my local computer that way I can open it with my IDE or text editor and see how it was created (syntax). However, lets say i do edit it and find myself wanting to add it back into the server. I’m assuming i would need to add it with phpmyadmin rather than dropping it into a directory. Also your last few statements made it seem like i can have both sql file and php work together side by side without needing a server (besides the server needed to run a php file)
Yeah i like that better, using php to manipulate a database or wait am i only able to create a database in php and noy manipulate it? Also would you recommend id do this with php or should i simply learn how to keep the entities both seperate?
Also im assuming id call this connect.php, then that means i would only need to call it once within a main php file otherwise id be creating more and more databases or does it not matter since the server knows how many to create?
The tutorial details how you can create, delete, update, databases, tables, indexii, etc and shows numerous examples.
When you have access to your laptop please complete the full tutorial. If you have any further questions please feel free to supply the relevant script and state your problems.
You don’t create a database using PHP or anything. PHP is just a scripting language which has built in connection procedures so you can connect to the server which hosts that database and manipulate it.
So whether you use PHPMyAdmin or PHP directly, it doesn’t matter.
You could also use a command screen to create, manipulate or delete your database. Or any benchmarking tool (that really depends on your hosting. Shared hosting do not allow remote connections for security reasons but other types of hosting often do)
The important instruction here is the SQL order that creates that database.
“CREATE DATABASE Whatever_Name”
After that, you’ll need to create tables with its fields, primary keys, etc.
After sitting down and reading, i realize the simplicity of SQL. I gained access to myphpadmin from my WAMPP and was both able to create and see the database. My goal now is being able to modify it utilizing myphpadmin as well as connecting to it using php. Also i need to learn how to call specific portions of the database and add/edit values already within the database. However, thats a matter of simply reading documentation and seeing more examples.