Re: select from otherdb.table question?

2008-01-20 Thread Brent Baisley
When you establish a connection, it's a connection to a server, not a  
specific DB. You can set a default db so that you don't always have  
to specify the db name you are working with. So to answer your  
question, no, a new connection is not established.


Brent


On Jan 19, 2008, at 10:19 AM, Alex K wrote:


Hi Guys,

What does the statement select * from otherdb.table do if I haven't
explicitly connected to otherdb previously? I would assume it connects
to otherdb and does the select on table but does it create a new
connection each time? Is it as efficient as explicitly connecting to
otherdb and then querying. I'm using webware DBUtils for connection
pooling. Would these connections also be taken into account?

Thank you so much,

Alex

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql? 
[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: select from otherdb.table question?

2008-01-20 Thread Alex K
Hi Brent,

ahh of course :) thank you so much for answering though.

Alex

On 20/01/2008, Brent Baisley [EMAIL PROTECTED] wrote:
 When you establish a connection, it's a connection to a server, not a
 specific DB. You can set a default db so that you don't always have
 to specify the db name you are working with. So to answer your
 question, no, a new connection is not established.

 Brent


 On Jan 19, 2008, at 10:19 AM, Alex K wrote:

  Hi Guys,
 
  What does the statement select * from otherdb.table do if I haven't
  explicitly connected to otherdb previously? I would assume it connects
  to otherdb and does the select on table but does it create a new
  connection each time? Is it as efficient as explicitly connecting to
  otherdb and then querying. I'm using webware DBUtils for connection
  pooling. Would these connections also be taken into account?
 
  Thank you so much,
 
  Alex
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql?
  [EMAIL PROTECTED]
 


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Where can I get mysql.so?

2008-01-20 Thread Daniel Kasak
On Sat, 2008-01-19 at 19:02 +, Apple wrote:

 Fatal error: Call to undefined function mysql_connect() in
  /home/re/script.php on line 3
 
 
 I've googled and found out that I need to add extension=mysql.so
  in CLI's php.ini file (separate php.ini file that works for CLI only).
 
 The problem is my PHP configured with MySQL support and MySQL
  library doesn't load as dynamic library.
 
 I've searched for mysql.so on my server (find / -name mysql.so), but found 
 only
 this:
 /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-
 multi/auto/DBD/mysql/mysql.so
 
 I guess it's mysql.so from another installation, but I've copied it to
  extension directory and added extension=mysql.so to the CLI's php.ini file.

That definitely won't work. The file you found belongs to Perl, not PHP.
Remove it from where you copied it.

 So, I guess I was right, it's mysql.so from another installation.
 
 I wonder, where can I get proper mysql.so? Can I download it
 somewhere?

It's been quite a while since I built PHP manually. From memory, it
included MySQL drivers ( maybe with a configure option ). I'm not sure
if it's still included or not. How did you install PHP? Was it with a
package manager, or was it already installed by your distro, or did you
install it manually?

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Who know this strange problem

2008-01-20 Thread Moon's Father
This is correct.Thank you very much.
But I also why I wrote is wrong on linux and right on windows.
You can tell me answer if you have time.thanks.

On Jan 19, 2008 12:47 AM, Baron Schwartz [EMAIL PROTECTED] wrote:

 Hi,

 On Jan 18, 2008 3:50 AM, Moon's Father [EMAIL PROTECTED] wrote:
  My test is as follows:
  mysql  select g_id from t group by g_id order by g_id desc limit 0,1;
  +--+
  | g_id |
  +--+
  |6 |
  +--+
  1 row in set (0.00 sec)
 
  mysql  select g_id from t group by g_id order by g_id desc limit 0,1
 into
  @tmp_id;
  Query OK, 1 row affected (0.00 sec)
 
  mysql select @tmp_id;
  +-+
  | @tmp_id |
  +-+
  |   5 |
  +-+

 Try it this way:

 mysql select @tmp_id := g_id from t group by g_id order by g_id desc
 limit 0,1;
 +-+
 | @tmp_id := g_id |
 +-+
 |   6 |
 +-+
 1 row in set (0.00 sec)

 mysql select @tmp_id;
 +-+
 | @tmp_id |
 +-+
 | 6   |
 +-+

 This seems like a bug to me.  You should file a bug report at
 bugs.mysql.com.

  1 row in set (0.00 sec)
 
  mysql select version();
  +-+
  | version()   |
  +-+
  | 5.1.21-beta-log |
  +-+
  1 row in set (0.00 sec)
 
  mysql
 
 
  But the variabe @tmp_id 's value is 5;
  Any help is appreciated.
 
  Here is my test data.
 
  DROP TABLE IF EXISTS `t`;
 
  CREATE TABLE `t` (
`id` int(11) NOT NULL auto_increment,
`g_id` int(11) NOT NULL,
`t_str` varchar(255) NOT NULL,
PRIMARY KEY  (`id`),
key (`g_id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
 
  /*Data for the table `t` */
 
  insert  into `t`(`id`,`g_id`,`t_str`) values
  (1,2,'wo'),
  (2,2,'ni'),
  (3,2,'ta'),
  (4,3,'wo '),
  (5,4,'ni'),
  (6,3,'ni'),
  (7,4,'ta'),
  (8,3,'wang'),
  (9,4,'li'),
  (10,3,'hai'),
  (11,4,'ri'),
  (12,2,'ren'),
  (13,5,'ta'),
  (14,6,'ri'),
  (15,6,'ren'),
  (16,6,'fuck'),
  (17,6,'shit'),
  (18,5,'ls'),
  (19,5,'chmod'),
  (20,5,'chgrp'),
  (21,5,'chown'),
  (22,3,'rm'),
  (23,3,'desc'),
  (24,4,'pwd'),
  (25,5,'cd');
 
 
  --
  I'm a mysql DBA in china.
  More about me just visit here:
  http://yueliangdao0608.cublog.cn
 




-- 
I'm a mysql DBA in china.
More about me just visit here:
http://yueliangdao0608.cublog.cn


Re: Handling Special Characters

2008-01-20 Thread Sebastian Mendel

Jerry Schwartz schrieb:

I am having trouble inserting special characters into a table. I am using
the MySQL client. I put the following commands into a text file (I'm on
WinXP, using Notepad), copy them, and paste them into the MySQL command line
client.

SET NAMES utf8;

CREATE TEMPORARY TABLE `giiexpr_db`.`eo_name_table` (
`eo_name` VARCHAR( 255 ) NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;

INSERT INTO eo_name_table
(eo_name)
VALUES
(Associated British Foods Plc (Abf) - Hot Drinks - World);

SELECT * FROM eo_name_table;
+-+
| eo_name |
+-+
| Associated British Foods Plc (Abf) - Hot Drinks - World |
+-+
1 row in set (0.04 sec)

That symbol before World is an N-dash, 0x96. This works perfectly.

Here's where things go wrong. If instead of pasting these commands into the
client, I source the exact same file, I get this:


you need to take care of the used charset with the text-file



[...]

Anyone have any ideas? I was trying to avoid having to write a program to do
this.


use UTF-8 for text files
use SET NAMEs to correctly MySQL what charset you are using



--
Sebastian

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Is there any determined date for mysql 6 release?

2008-01-20 Thread Sebastian Mendel

legolas schrieb:

Hi
Thank you for reading my post
Is there any  scheduled date mysql 6 release?


don't know


I heard that it is based on falcon and can perform better...


based on in the wrong term, MyISAM will still be the default storage 
engine, it just adds Falcon as a new storage engine


http://dev.mysql.com/doc/refman/6.0/en/storage-engine-overview.html

--
Sebastian

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



encrypt - password

2008-01-20 Thread Luca Ferrari
Hi all,
I've got an account table with password encrypted thru the encrypt() function, 
and I should transfer them to a table with password() function. I don't want 
to decrypt the password, and I'd like to know if there's a way to build the 
password hash from the encrypt one.

Any suggestion?

Thanks,
Luca

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]