answersLogoWhite

0


Best Answer

Please refer link. The presentation gives complete understanding of how to deal with database (Mysql) with php.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you handle database in php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a database in PHP?

Database = Where you save your data (ex: if a user fill your registration form, entered data should be saved somewhere, that's database) Usually in PHP we use MySQL Database.


How does PHP work in the server?

Your PHP code accesses the database running on the same machine. It acts as an interface to the database. The user indirectly modifies the database through your code. The database is stored wherever. It really doesn't matter to you.


What database does the WAmmp server refer to when it's used with PHP?

WAMP is an abbreviation of "Windows, Apache, MySQL, and PHP", so it uses MySQL database server.


How are placeholders used in PHP database programming?

Placeholders in an abstraction layer such as PDO in PHP allows for caching and security in database queries (they fight SQL injection).


Which database is good mysql or PHP?

PHP is a programming language, but MySQL is a database management system. They are two entirely different objects, and as a result, they are utilised for two quite different purposes. To learn more about data science please visit- Learnbay.co


How do you retrieve values from database?

It depends on what database are you using. There are some ways in PHP but the most common of them are PHP native database driver and PDO. PHP native database driver is a collection of functions to communicate with a particular DBMS, they usually have the DBMS name prefixed in the function name. For example, driver functions for MySQL have mysql_* prefix.


What is the database not found error in PHP with MySQL?

It would mean the database you are trying to select in your PHP script couldn't be found, you will need to check to see if you are using the correct details.


How are the simple coding of php with database?

Working with mySQL databases: <?php // Connects to the database mysql_connect(servername,username,password); // Inserts into a database mysql_query(INSERT INTO table(cat1, cat2, cat3) VALUES(one,two,three)); ?>


How do you close a MySQL database connection using PHP?

To close your MySQL database connection you need to use the mysql_close() function. Please see the example below: <?php mysql_close(); ?> If your connection data is stored in a variable you would close the connection like this instead: <?php mysql_close($db_conn); ?> That's useful for if you're using more than one database connection in a PHP script.


What are the advantages and disadvantages of PHP with mysql?

Ultimately PHP is a programming language and MySQL is a database language. Using PHP with MySQL is a nice combination with built-in support and the simplicity of it all. However, there aren't a lot of disadvantages of using PHP with a database, it just allows for better data organization and whatnot. There are definitely advantages and disadvantages to using a database other than MySQL (such as MongoDB or PostgreSQL).


What might be the causes of errors in PHP?

The main causes of errors in PHP can be the problems occurring from the MYSQL database (if there) or errors from Apache handler. These errors can be prevented by hosting the MYSQL database on a trusted and good server.


How do you store Unicode chars in a MySQL database and then display them back with PHP?

Set up the database as a UTF-8-encoded database. You can do this easily with PHPMyAdmin.