• home
  • forum
  • my
  • kt
  • download
  • [MYSQL] functions/queries list

    Author: 2007-09-03 10:54:56 From:

    In this topic we'll put all MYSQL functions,queries, we'll update as much as possible.

    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 [table] ([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 [table] , and where [field] is [object] (== / != / ...) [value]
    UPDATE [table] SET [field] [object] [value] WHERE [field] [object] [value] - updates the table [table] by setting the field [field] [object](== or !== or ...) to [value]
    DELETE FROM [table] WHERE [field] [object] [value] - deletes a row from [table] where [field] is [object](== or != or ...) [value]

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      Miscellaneous (6)

    New

    Hot