[MYSQL]functions/queries list
Published by Unknown on Monday, July 30, 2007 at 10:08 PM.
Here is a lot of the fuctions, queries list.
FUNCTIONS
mysql_query([query]) - execute query [query] with the database
mysql_connect([host],[user],[pass]) - tries to connect you to [host] at username [user] and password [pass]
mysql_select_db([db]) - selects the database [db] and tries to connect with
mysql_num_rows(mysql_query([query)) - counts the amount of results queries in the query [query]
mysql_fetch_assoc([query]) - set all results from the query [query] into a array $var[field]
mysql_fetch_rows([query[) - works same as mysql_fetch_assoc but this one is some slower, more change on fail
QUERIES
SELECT [field] FROM [tabel] WHERE [field] [object] [value] LIMIT [limit] ORDER BY [field] [ordertype] GROUP BY [field] - selects [field] from the table [tabel] and where the field [field] is [object](== / != / ...) to [value], order the found results by the field [field] and order it [ordertype](DESC/ASC) and set it into a group by field [field]
INSERT INTO
([fields])VALUES([values) WHERE [field] [object] [value] - insert the values [values] into the fields [fields] (1st one in the 1st field, 2nd one in the 2nd filled in field, etc.) in the table
, and where [field] is [object] (== / != / ...) [value]
UPDATE
SET [field] [object] [value] WHERE [field] [object] [value] - updates the table
by setting the field [field] [object](== or !== or ...) to [value]
DELETE FROM
WHERE [field] [object] [value] - deletes a row from
where [field] is [object](== or != or ...) [value]
FUNCTIONS
mysql_query([query]) - execute query [query] with the database
mysql_connect([host],[user],[pass]) - tries to connect you to [host] at username [user] and password [pass]
mysql_select_db([db]) - selects the database [db] and tries to connect with
mysql_num_rows(mysql_query([query)) - counts the amount of results queries in the query [query]
mysql_fetch_assoc([query]) - set all results from the query [query] into a array $var[field]
mysql_fetch_rows([query[) - works same as mysql_fetch_assoc but this one is some slower, more change on fail
QUERIES
SELECT [field] FROM [tabel] WHERE [field] [object] [value] LIMIT [limit] ORDER BY [field] [ordertype] GROUP BY [field] - selects [field] from the table [tabel] and where the field [field] is [object](== / != / ...) to [value], order the found results by the field [field] and order it [ordertype](DESC/ASC) and set it into a group by field [field]
INSERT INTO
([fields])VALUES([values) WHERE [field] [object] [value] - insert the values [values] into the fields [fields] (1st one in the 1st field, 2nd one in the 2nd filled in field, etc.) in the table
, and where [field] is [object] (== / != / ...) [value]
UPDATE
SET [field] [object] [value] WHERE [field] [object] [value] - updates the table
by setting the field [field] [object](== or !== or ...) to [value]
DELETE FROM
WHERE [field] [object] [value] - deletes a row from
where [field] is [object](== or != or ...) [value]