Database Format
Posted: Wed Mar 07, 2007 7:19 pm
feyd | Please use
to this:
I checked the "engine" type and it does still match. However, I can't seem to find in PHPMyAdmin where I can find the charset value. I'm guessing thats where the problem is from.
How can I fix this? Is it MySQL or is it because the string was escaped on my server and it has a different encoding then the public server? Any idea's?
feyd | Please use[/syntax]
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]
I've just recently finished a huge client website almost totally backed by a mysql database. All webpages and content are loaded from the database so I've used html entities and mysql real escape string to protect the scripts from failing. My client does have a custom made panel to modify her websites from.
The website is done and I was just moving it over to her perminate host. Its all setup and working fine except the formatting is off. Almost all ' s are being converted and formatted wrong. When I imported the SQL into the final database it would be stored on I did have to remove some things from the sql.
To make PHPMyAdmin on the clients new server accept the SQL statement it was changed from this:
[syntax="sql"]CREATE TABLE `web_pages` (
`id` int(255) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`top_banner_1` varchar(255) NOT NULL default '',
`top_banner_2` varchar(255) NOT NULL default '',
`top_banner_3` varchar(255) NOT NULL default '',
`menu_bar` longtext NOT NULL,
`menu` varchar(255) NOT NULL default 'yes',
`page_pre_content` longtext NOT NULL,
`page_content` longtext NOT NULL,
`page_footer` longtext NOT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=50 ;Code: Select all
CREATE TABLE `web_pages` (
`id` int(255) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`top_banner_1` varchar(255) NOT NULL default '',
`top_banner_2` varchar(255) NOT NULL default '',
`top_banner_3` varchar(255) NOT NULL default '',
`menu_bar` longtext NOT NULL,
`menu` varchar(255) NOT NULL default 'yes',
`page_pre_content` longtext NOT NULL,
`page_content` longtext NOT NULL,
`page_footer` longtext NOT NULL,
UNIQUE KEY `id` (`id`)
) AUTO_INCREMENT=50 ;How can I fix this? Is it MySQL or is it because the string was escaped on my server and it has a different encoding then the public server? Any idea's?
feyd | Please use[/syntax]
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]