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. Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.