Hi, Indeed, mysql_simple_command (with COM_PING command like argument ) is used by C API mysql_ping, to check connection.MYSQL struct it's used like handler. For a connection you must use in order: mysql_init(), -initialise MYSQL struct mysql_options(), - option for connection(set TIMEOUT_CONNECTION,SSL....) mysql_real_connect(). -the user authentification and connection (User,Password,DataBase,Server Port....) If the connection it's not established the MYSQL struct is deinitialised and returning NULL otherwise is a handler. It's a good idea if you use mysql_error() after every executed query(mysql_real_query() return NULL if the connection is broken).The error can be find in MYSQL struct. When you wish to close connection must use mysql_close(). So... you don't need mysql_ping ... unless if want to check periodical if the server is "alive". mysql_ping it's like any other "ping". I hope it's what you need . Regards,
Gelu _____________________________________________________ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] ----- Original Message ----- From: "Melvyn Sopacua" <[EMAIL PROTECTED]> To: "Gelu Gogancea" <[EMAIL PROTECTED]> Cc: "MySQL General" <[EMAIL PROTECTED]> Sent: Sunday, June 02, 2002 9:13 PM Subject: Re: mysql_ping() > At 19:53 2-6-2002, Gelu Gogancea shared with all of us: > > >mysql_ping check connection to server. > >In documentation at "8.4.3.163 mysql_ping()" you can find more details about > >that. > > Yeah right. > Did you actually take a look? > Reading the source gives me more information. I know it returns an integer, > and needs a mysql connection. > > It's the mysql connection itself and the closer, which are handled by, > mysql_simple_command() and the mysql struct. > > What I want to know, is: > 1) after reading the header, how should one respond? > 2) Is a command necessary, or can one close after succesfully authenticating? > 3) Is there a sign-off? > > Ie - what does a minimal valid connection look like? > > > > Best regards, > > Melvyn Sopacua > WebMaster IDG.nl > _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ > If it applies, where it applies - this email is a personal > contribution and does not reflect the views of my employer > IDG.nl. > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\ > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php