1 2 3 > >>   Sort: Date

How To Get the Last ID Assigned by MySQL
How To Get the Last ID Assigned by MySQL? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If you use an ID column with AUTO_INCREMENT attribute, you can use the mysql_insert_id() function to get the last ID value assigned by the MySQL server, as shown in the sample script below: ...
2007-05-11, 6275👍, 0💬

How To Build WHERE Criteria with Web Form Search Fields
How To Build WHERE Criteria with Web Form Search Fields? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If your PHP script is linked to a Web form which takes search key words for multiple data fields. For example, your Web form asks your visitor to search for Website links with...
2007-05-11, 6103👍, 0💬

How To Display a Past Time in Days, Hours and Minutes
How To Display a Past Time in Days, Hours and Minutes? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts You have seen a lots of Websites are displaying past times in days, hours and minutes. If you want to do this yourself, you can use the TIMEDIFF() SQL function. Note that the TI...
2007-05-11, 5871👍, 0💬

How To Insert Multiple Rows with a SELECT Statement
How To Insert Multiple Rows with a SELECT Statement? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If want to insert rows into a table based on data rows from other tables, you can use a sub-query inside the INSERT statement as shown in the following script example: <?ph...
2007-05-10, 5564👍, 0💬

How To Query Multiple Tables Jointly
How To Query Multiple Tables Jointly? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If you want to query information stored in multiple tables, you can use the SELECT statement with a WHERE condition to make an inner join. Assuming that you have 3 tables in a forum system: "use...
2007-05-11, 5078👍, 0💬

How To Break Output into Pages
How To Break Output into Pages? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If you have a query that returns hundreds of rows, and you don't want to present all of them to your users on a single page. You can break output into multiple pages, and only present 10 rows per page...
2007-05-10, 4946👍, 0💬

How To Get the ID Column Auto-Incremented
How To Get the ID Column Auto-Incremented? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts Many tables require an ID column to assign a unique ID number for each row in the table. For example, if you have a table to hold forum member profiles, you need an ID number to identify ea...
2007-05-11, 4898👍, 0💬

How To Perform Key Word Search in Tables
How To Perform Key Word Search in Tables? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts The simplest way to perform key word search is to use the SELECT statement with a LIKE operator in the WHERE clause. The LIKE operator allows you to match a text field with a keyword pattern...
2007-05-11, 4884👍, 0💬

How To Get the Last ID Assigned by MySQL
How To Get the Last ID Assigned by MySQL? - PHP Script Tips - Working with MySQL Database If you use an ID column with AUTO_INCREMENT attribute, you can use the mysql_insert_id() function to get the last ID value assigned by the MySQL server, as shown in the sample script below: <?php include...
2007-04-18, 4881👍, 0💬

How To Quote Date and Time Values in SQL Statements
How To Quote Date and Time Values in SQL Statements? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If you want to provide date and time values in a SQL statement, you should write them in the format of "yyyy-mm-dd hh:mm:ss", and quoted with single quotes ('). The tutorial exerc...
2007-05-11, 4869👍, 0💬

How To Update Existing Rows in a Table
How To Update Existing Rows in a Table? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts Updating existing rows in a table requires to run the UPDATE statement with a WHERE clause to identify the row. The following sample script updates one row with two new values: <?php in...
2007-05-11, 4865👍, 0💬

How To Query Tables and Loop through the Returning Rows
How To Query Tables and Loop through the Returning Rows? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts The best way to query tables and loop through the returning rows is to run the SELECT statement with the mysql_query() function, catch the returning object as a result set, an...
2007-05-11, 4796👍, 0💬

How To Quote Text Values in SQL Statements
How To Quote Text Values in SQL Statements? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts Text values in SQL statements should be quoted with single quotes ('). If the text value contains a single quote ('), it should be protected by replacing it with two single quotes (''). In...
2007-05-11, 4723👍, 0💬

How To Use MySQL Command Line Interface
How To Use MySQL Command Line Interface? - PHP Script Tips - Working with MySQL Database MySQL server comes with a command line interface, which will allow you to operate with the server with SQL statements and other commands. To start the command line interface, you can run the \mysql\bin\mysql pro...
2007-04-18, 4699👍, 0💬

How To Delete Existing Rows in a Table
How To Delete Existing Rows in a Table? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If you want to remove a row from a table, you can use the DELETE statement with a WHERE clause to identify the row. The following sample script deletes one row: <?php include "mysql_con...
2007-05-11, 4662👍, 0💬

How To Get the ID Column Auto-Incremented
How To Get the ID Column Auto-Incremented? - PHP Script Tips - Working with MySQL Database Many tables require an ID column to assign a unique ID number for each row in the table. For example, if you have a table to hold forum member profiles, you need an ID number to identify each member. To allow ...
2007-04-14, 4653👍, 0💬

How To Get Some Basic Information Back from MySQL Servers
How To Get Some Basic Information Back from MySQL Servers? - MySQL FAQs - PHP Connections and Query Execution Once you got a MySQL server connection object successfully, you can use mysql_get_server() and mysql_get_host_info() to get some basic information from your MySQL server. The tutorial exerci...
2007-05-10, 4544👍, 0💬

How To Perform Key Word Search in Tables
How To Perform Key Word Search in Tables? - PHP Script Tips - Working with MySQL Database The simplest way to perform key word search is to use the SELECT statement with a LIKE operator in the WHERE clause. The LIKE operator allows you to match a text field with a keyword pattern specified as '%keyw...
2007-04-19, 4544👍, 0💬

How To Query Multiple Tables Jointly
How To Query Multiple Tables Jointly? - PHP Script Tips - Working with MySQL Database If you want to query information stored in multiple tables, you can use the SELECT statement with a WHERE condition to make an inner join. Assuming that you have 3 tables in a forum system: "users" for user profile...
2007-04-19, 4495👍, 0💬

How To Fix the INSERT Command Denied Error
How To Fix the INSERT Command Denied Error? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts The reason for getting the "1142: INSERT command denied" error is that your user accound does not have the INSERT privilege on the table or database. To resolve this error, you need to ask...
2007-05-10, 4482👍, 0💬

How To Connect to a MySQL Sever with a Port Number
How To Connect to a MySQL Sever with a Port Number? - MySQL FAQs - PHP Connections and Query Execution If you want to connect a MySQL server with a non-default port number, you need to use the "mysql_connect($server)" function with $server in the format of "hostName:portNubmber". The tutorial exerci...
2007-05-10, 4477👍, 0💬

How To Get a List of Databases from MySQL Servers
How To Get a List of Databases from MySQL Servers? - MySQL FAQs - PHP Connections and Query Execution Once you got a MySQL server connection object successfully, you need to know what databases are available on the server and which database you should use to manage your tables and data. To get a lis...
2007-05-10, 4456👍, 0💬

How To Access MySQL Servers through Firewalls
How To Access MySQL Servers through Firewalls? - MySQL FAQs - PHP Connections and Query Execution If your MySQL server is provided by an Internet service company, connecting to the server from your local machine will not be so easy, because there are firewalls between your local machine and your MyS...
2007-05-10, 4430👍, 0💬

How To Get the Number of Rows Selected or Affected by a SQL Statement
How To Get the Number of Rows Selected or Affected by a SQL Statement? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts There are two functions you can use the get the number of rows selected or affected by a SQL statement: mysql_num_rows($res) - Returns the number of rows selecte...
2007-05-10, 4417👍, 0💬

1 2 3 > >>   Sort: Date