need help with insert into - CHARSET

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
giliat
Forum Commoner
Posts: 28
Joined: Sun May 20, 2007 2:00 pm

need help with insert into - CHARSET

Post by giliat »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hello
i need help 
i have to make what i insert into table to be CHARSET utf8
anything i do jyst change the table to utf8 but inside it stay LATIN !!!


this is part of my script

thaks a lot

Code: Select all

$query = "CREATE TABLE stars (name VARCHAR(40), code VARCHAR(40)) DEFAULT CHARSET=utf8 COLLATE utf8_general_ci" ;

$result = mysql_query($query)
or die ("Query failed: " . mysql_error());



//--הכנסת נתון לטבלה = insert into table 
$query = "insert into stars (name,code)
VALUES ('all','0')";

$result = mysql_query($query)
or die ("Query failed: " . mysql_error());





$query = "insert into stars (name,code)
VALUES ('one','1')";

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Last edited by giliat on Tue Jul 10, 2007 4:49 am, edited 1 time in total.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

You do aware that except me and maybe one other guy no one here can read Hebrew, right?
Post Reply