Reserved Words Used in MySQL Newest Version
Today I will share with you all the reserved words that I’ve learned from my updated MySQL Database Server Version 5.5. This version has been released since Jan 14, 2010 by Oracle. I used to have MySQL v. 5.1 on my Apache server, now I updated to the latest version. The list below includes the reserved words from the latest version which is 5.5. The bottom of this page is the list of reserved words from previous versions. I will explain how these reserved words are used in MySQL in the next article.
The following are new reserved words in MySQL 5.5:
IGNORE_SERVER_IDS |
MASTER_HEARTBEAT_PERIOD |
MAXVALUE |
RESIGNAL |
SIGNAL |
ACCESSIBLE |
ADD |
ALL |
ALTER |
ANALYZE |
AND |
AS |
ASC |
ASENSITIVE |
BEFORE |
BETWEEN |
BIGINT |
BINARY |
BLOB |
BOTH |
BY |
CALL |
CASCADE |
CASE |
CHANGE |
CHAR |
CHARACTER |
CHECK |
COLLATE |
COLUMN |
CONDITION |
CONSTRAINT |
CONTINUE |
CONVERT |
CREATE |
CROSS |
CURRENT_DATE |
CURRENT_TIME |
CURRENT_TIMESTAMP |
CURRENT_USER |
CURSOR |
DATABASE |
DATABASES |
DAY_HOUR |
DAY_MICROSECOND |
DAY_MINUTE |
DAY_SECOND |
DEC |
DECIMAL |
DECLARE |
DEFAULT |
DELAYED |
DELETE |
DESC |
DESCRIBE |
DETERMINISTIC |
DISTINCT |
DISTINCTROW |
DIV |
DOUBLE |
DROP |
DUAL |
EACH |
ELSE |
ELSEIF |
ENCLOSED |
ESCAPED |
EXISTS |
EXIT |
EXPLAIN |
FALSE |
FETCH |
FLOAT |
FLOAT4 |
FLOAT8 |
FOR |
FORCE |
FOREIGN |
FROM |
FULLTEXT |
GRANT |
GROUP |
HAVING |
HIGH_PRIORITY |
HOUR_MICROSECOND |
HOUR_MINUTE |
HOUR_SECOND |
IF |
IGNORE |
IGNORE_SERVER_IDS |
IN |
INDEX |
INFILE |
INNER |
INOUT |
INSENSITIVE |
INSERT |
INT |
INT1 |
INT2 |
INT3 |
INT4 |
INT8 |
INTEGER |
INTERVAL |
INTO |
IS |
ITERATE |
JOIN |
KEY |
KEYS |
KILL |
LEADING |
LEAVE |
LEFT |
LIKE |
LIMIT |
LINEAR |
LINES |
LOAD |
LOCALTIME |
LOCALTIMESTAMP |
LOCK |
LONG |
LONGBLOB |
LONGTEXT |
LOOP |
LOW_PRIORITY |
MASTER_HEARTBEAT_PERIOD |
MASTER_SSL_VERIFY_SERVER_CERT |
MATCH |
MAXVALUE |
MEDIUMBLOB |
MEDIUMINT |
MEDIUMTEXT |
MIDDLEINT |
MINUTE_MICROSECOND |
MINUTE_SECOND |
MOD |
MODIFIES |
NATURAL |
NOT |
NO_WRITE_TO_BINLOG |
NULL |
NUMERIC |
ON |
OPTIMIZE |
OPTION |
OPTIONALLY |
OR |
ORDER |
OUT |
OUTER |
OUTFILE |
PRECISION |
PRIMARY |
PROCEDURE |
PURGE |
RANGE |
READ |
READS |
READ_WRITE |
REAL |
REFERENCES |
REGEXP |
RELEASE |
RENAME |
REPEAT |
REPLACE |
REQUIRE |
RESIGNAL |
RESTRICT |
RETURN |
REVOKE |
RIGHT |
RLIKE |
SCHEMA |
SCHEMAS |
SECOND_MICROSECOND |
SELECT |
SENSITIVE |
SEPARATOR |
SET |
SHOW |
SIGNAL |
SMALLINT |
SPATIAL |
SPECIFIC |
SQL |
SQLEXCEPTION |
SQLSTATE |
SQLWARNING |
SQL_BIG_RESULT |
SQL_CALC_FOUND_ROWS |
SQL_SMALL_RESULT |
SSL |
STARTING |
STRAIGHT_JOIN |
TABLE |
TERMINATED |
THEN |
TINYBLOB |
TINYINT |
TINYTEXT |
TO |
TRAILING |
TRIGGER |
TRUE |
UNDO |
UNION |
UNIQUE |
UNLOCK |
UNSIGNED |
UPDATE |
USAGE |
USE |
USING |
UTC_DATE |
UTC_TIME |
UTC_TIMESTAMP |
VALUES |
VARBINARY |
VARCHAR |
VARCHARACTER |
VARYING |
WHEN |
WHERE |
WHILE |
WITH |
WRITE |
XOR |
YEAR_MONTH |
ZEROFILL |
Different ways to opening new windows using JavaScript
If you notice on most of the websites on the internet and inside most of web applications, you will find that opening a new window is a popular way of letting users/readers see additional information without navigating away from the current page. With JavaScript you can specify the dimensions, position and visible toolbars of this newly created window, as well as writing code directly into it and having the two windows operating together. To this aspect of modern web engineering, I will show you multiple ways to open a new window without interfering the current page.
Using <a href link tag
This tag will let user open a page without closing the current page:
<a href=”popup.html” target=”_blank”>Click here</a> to open new page
Using JavaScript OnClick() function
This function will let users open a brand new window with a defined size, then users can re-size the window when needed.
<a href=”javascript:void(0)” OnClick=”window.open(‘popup.html’, ‘pagename’, ‘height=400, width=400, location=no, resizable=yes, scrollbars=yes’);”>Click here</a> to open new page.
This method has some parameters below when you call the window.open function:
height | Defines the height of the window in pixels. Percentage values don’t work. |
width | Defines the width. Again, you’ll have no joy with percentages. |
left | Supported by version 4 browsers and above, this sets how far removed the window appears from the left of the screen. In pixels. |
top | Partner to left, this pushes the window off the top of the screen. |
resizable | Set to true or false, this may allow the user to resize the window. |
scrollbars | Another Boolean value, this adds scrollbars to the new window. If your content may be longer then the dimensions you’ve specified, make sure this is set to yes. |
toolbar | Specifies whether the basic back/forward toolbar should be visible. If there are links to follow in your new page, set this to yes. |
menubar | Specifies whether the main toolbar (File, Edit, …) is shown. |
location | Specifies whether the location toolbar (address bar) is shown. |
status | Specifies whether the new window can have a status bar. Best set to yes. For security reasons, Mozilla-based browsers always show the status bar. |
directories | Specifies whether the directories toolbar is shown (Links toolbar in IE). |
fullscreen | This parameter is optional. Works only in Internet Explorer-only Boolean attribute which may open the window in fullscreen. It’s not a good idea to use it. |
Using <div> tag for a popup window
This method you will have to download jquery.min.js and fancyzoom.js files from jquery. Then you can add a <div> tag on the same page that includes these 2 JavaScript files. You will have to remember to download all images that are decorating the jQuery box, so it looks more professional. This method won’t be described here since you can get more details on jQuery website.
Get the last id from a table
If you need an ID before you can get the data from user’s inputs, you can use the query below to get the last id from a table in your database, and then you can increment 1 to that id. For example, a brand new ID can be assigned to an online order using the last id from the table and add 1 to it. Here’s what you can do:
Send a query that return the last id of a table using either query below:
select max(id) from software_order.user limit 1;
select max(id) from software_order.user;The result is:
3355
Then add 1 to this id, now you’ve got 3356 which will be assign to the new order. This way will ensure that you always have the ID in hand before user enters data into an order form.
If your application just completed an insert statement into software_order.user table, you can use a function called mysql_insert_id() to get the ID generated in the last query. It’s simple to use.
Here’s the example:
$last_id = mysql_insert_id();
Project 1 with AW
Integration of Credit Card Payment Gateway by Authorize.Net with AppraisalWorld System.
- Develop CIM and SIM interface for Sales department, using Authorize.Net API
Purpose of this integration:
- Sales team can charge software customers through an internal Admin interface and storing customers’ credit card information securely on Authorize.Net CIM server
Method:
- SOAP call or REST to get a return of XML string
Target date:
- April 5th, 2010
Detect user’s browser type
Some of you may wonder how a website can be able to detect my browser type. Today I will show you a way to detect what type of browser a user is using, so you can collect this data for your statistic purposes.
The codes below is only applied for php on *nux server
Then you can use this variable $browser_type to store in your database or use it to count how many browser type has been used to read your website.