seco Posted February 8, 2008 Share Posted February 8, 2008 Hi i use php to access mysql db and every mysql_query("") sql statement i have to execute mysql_query("set names 'cp1256';") to return the characters correctly so can i set the names in the db instead of calling this line alot of times? thanks in advance. Link to comment https://forums.phpfreaks.com/topic/90034-how-to-set-the-names-in-mysql-db/ Share on other sites More sharing options...
fenway Posted February 8, 2008 Share Posted February 8, 2008 It's possible that your connect() call could do this, you'd have to check the php spec. Link to comment https://forums.phpfreaks.com/topic/90034-how-to-set-the-names-in-mysql-db/#findComment-461735 Share on other sites More sharing options...
seco Posted February 8, 2008 Author Share Posted February 8, 2008 can connect fucntion set the names for all mysql executions? how? waht i can write? Link to comment https://forums.phpfreaks.com/topic/90034-how-to-set-the-names-in-mysql-db/#findComment-461809 Share on other sites More sharing options...
fenway Posted February 8, 2008 Share Posted February 8, 2008 Like I said, you'd have to check the function spec... I don't know what options they support. Link to comment https://forums.phpfreaks.com/topic/90034-how-to-set-the-names-in-mysql-db/#findComment-461931 Share on other sites More sharing options...
seco Posted February 8, 2008 Author Share Posted February 8, 2008 do you mean to execute set names before the connect statement right? because i don't call it there. Link to comment https://forums.phpfreaks.com/topic/90034-how-to-set-the-names-in-mysql-db/#findComment-462092 Share on other sites More sharing options...
fenway Posted February 9, 2008 Share Posted February 9, 2008 I'm not versed in php... I'd imagine that you can do this once per connection. Link to comment https://forums.phpfreaks.com/topic/90034-how-to-set-the-names-in-mysql-db/#findComment-462799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.