May 24, 2009

mysql ASCII function

admin

mysql ASCII function

Ads



mysql ASCII function keyword is used to return the numeric value of the leftmost character of the string ’str’. Returns 0 if ’str’ is the empty string and  returns NULL if str is NULL.

Note that ASCII() works for 8-bit characters.

Example:

1- SELECT ASCII(’1′);
   >> 49

2- SELECT ASCII(field) FROM table WHERE 1


Related Posts:
  1. mysql SUBSTRING function keyword
    mysql SUBSTRING function keyword, it used to split the string for a field into sub strings.  SUBSTRING (Field) Return the substring as specified SQL Code Examples: Select SUBSTRING (name,0,3) where 1 ; returns...
  2. mysql CHAR_LENGTH(str) function
    CHAR_LENGTH(str) function Returns the length of the string str, measured in characters. A multi-byte character counts as a single character. Example SELECT CHAR_LENGTH(Name)...
  3. mysql BIT_LENGTH(str) function
    BIT_LENGTH(str) function Returns the length of the string str in bits Example: SELECT BIT_LENGTH('text');...
  4. Javascript IsNumeric validator function
    This function is used to test a value stored in the parameter inputText is it numeric or not, in other words is it contains characters other than 1,2,3,4,5,6,7,8,9,0 ? if...
  5. mysql CONCAT(str1,str2,…) string concatenation function
    CONCAT(str1,str2,...) Returns the string that results from concatenating the arguments to gother. May have one or more arguments. Example: SELECT CONCAT('FA', 'KH', 'RI'); output >> FAKHRI...
  6. mysql string replace function in query
    mysql REPLACE function can be used as the following: replaces the string from_str with the string to_str examples : replace string in all records in tablename: update tablename set fieldname =replace...
  7. get free file name function with php
    Some times in when make a code for uploading files, you want that the uploaded file not to be over written, to do that you have to use this function....
  8. Warning: Cannot modify header information - headers already sent by (output started .. fix
    some times in PHP pages the message "Warning: Cannot modify header information - headers already sent by (output started .. " appears. The cause: You may use the function header...
  9. Get the current path using PHP
    if you need to get the current path using php, you have to use the following function. it returns the current path where are you browsing. Code: function current_path() {...
  10. PayPal ipn with php
    If you are searching about a paypal IPN (Instant Payment notification) , you are in the right place. Here I show a simple PayPal IPN (Instant Payment notification) to you. There are...
No responses to "mysql ASCII function"

No comments yet.

Leave a comment
Name : 
Mail : 
Website : 
Message :