Friday, 8 January 2016

Run the query MySQL from PHP (mysql_query)

Mysql_query () function requires two arguments, where the first argument is filled with MySQL query, and the second argument is filled with the results of the connection link mysql_connect () function. The second argument is optional.

Here is the basic format of writing mysql_query () function in PHP:

$result = mysql_query("query_mysql",[$link_koneksi_mysql]);

Stopping MySQL PHP connection with mysql_close ()


PHP with MySQL connection will be terminated automatically when the program execution is completed, which is when the PHP page is finished processing, so we do not need to manually menghentikanya.

But if you want to stop the connection with MySQL when the program is running PHP, PHP provides a function mysql_close (). This function takes one argument which is filled with the fruit of the variable 'link connection' results call mysql_connect () function. This connection variable is optional, and if omitted, PHP will use the last mysql connection.

PHP connection with MySQL (mysql_connect)


To make a connection between PHP with MySQL using mysql extension, PHP provides mysql_connect () function.
This function is described as a way to log into the MySQL ServerMysql_connect ().Function requires three arguments, and return value of the function in the form of 'variable' connection to MySQL.
Here is the basic format of writing the function mysql_connect ():
$link = mysql_connect(’mysql_host’, 'mysql_user', 'mysql_password');

Monday, 9 November 2015

retrieving the data in mysql with certain conditions and for inputting data.

retrieving the data in mysql with certain conditions and for inputting data | Problem solving with my sql education
select a query that is used to retrieve data or display data. The data have been taken or may be displayed in the application that we created or used to control the program.


In this tutorial we will discuss the basics of the SELECT statement in Oracle. To use the SELECT statement is advanced, we will discuss in the next tutorial.

Below is the basic syntax of the SELECT statement in Oracle:
Explanation syntax:

Sunday, 8 November 2015

Implementation of the sql statement include DDL, DML and DCL

Implementation of the sql statement include DDL, DML and DCL |problem solving in mysql education
Previously had little in the pillowcase on what it DDL, DML and DCL.
Here everything will be discussed in more detail:

1. DDL (Data Definition Language)
DDL is the SQL command associated with defining a database structure that is used to create, modify and delete metadata structures and definitions of database objects.

Some basic commands that include DDL include:

A. CREATE
This command is used to create, including creating a new database, the new table, new view, and column.

Fields and Records in Sql with Each Character.

fields and records in sql with each character | problem solving in my sql education

FIELD
Field is a column of a table. Field has the size of a particular data type that determines how the data will be saved.
The properties of the field is as follows: 
      1.        As the Primary key 
             attribute of Primary is the least that can distinguish each row of data in a table is uniquely     selected based on frequently used as a reference, more concise, and more guarantee a unique key.
Example: NIM students is the primary key of the table student. Nim has the function to be

The basic elements of SQL with MySQL implementations include statements, names, data types, constants, expressions and innate function.

The basic elements of SQL with MySQL implementations include statements, names, data types, constants, expressions and innate function. | Problem Solving in Mysql Education
After knowing the history of MySQL, now we are to the base in mysql.
Do you know about the basic elements that exist in mysql?
Answer :

1.   Statement
      Command of SQL is used to request an action to the DBMS. Basic SQL statements, among        others:
STATEMENT
DESCRIPTION
ALTER
Changing the table structure
COMMIT
Ending the execution of the transaction
CREATE
Create table, indexes
DELETE
Deletes the rows in a table
DROP
Deletes table, index
GRANT
Assigning rights to the database to the user
INSERT
Adding rows in the table
REVOKE
Cancel the rights to the database
ROLLBACK
Restoring the original state if the transaction fails to be implemented
SELECT
Select the rows and columns in a table
UPDATE
Change the value in a table row