Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-16-2012, 09:36 AM   PM User | #1
ebookz
New Coder

 
Join Date: Nov 2012
Posts: 33
Thanks: 23
Thanked 0 Times in 0 Posts
ebookz is an unknown quantity at this point
Smile inserting special characters in MySQL database

how to insert alpha,beta,delta to mysql database through php script?????
I want save my subject codes to my db table using these special characters..
example subject code "CSC113α"


can any one plzz help to do this....thanks in advanced....
ebookz is offline   Reply With Quote
Old 11-16-2012, 11:55 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
You'd need to change the collation of that filed to utf8_general_ci. Then add the following line to your PHP code before all insert/fetch operation to the DB - better to be used under mysql_select_db() statement.

PHP Code:
mysql_query("set names 'utf8'"); 
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Users who have thanked abduraooft for this post:
ebookz (11-16-2012)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:26 AM.


Advertisement
Log in to turn off these ads.