Re[2]: Robot Replies (Off topic)

2003-02-11 Thread sherzodr
Unfortunately,  good intentions don't always produce alike results.

How about if the bot replies to messages matching newbie, novice and beginner
in the subject? They most likely tend to be from beginners, and online manual
and/or list archives are pretty much perfect solutions for their issue. I'll
also make sure the replies are NOT posted to the list, insteat sent to the
original sender.

If anyone doesn't like the idea, i guess i'll make it opt-in list then.

sherzod


sql,query


-
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




RE: Robot Replies (WAS: Re: support question (win98_se) (auto))

2003-02-10 Thread sherzodr
: Am I the only one that equates these robot replies with 
: spam?  Most of
: them are as meaningful as talking to micro$oft.
: 
: Yeah, I filter them on input and they go to trash, but 
: silence can be
: taken as consent which might be construed as endorsement. 
:  Who knows
: what would come next?

Answers to most of the posted questions could be found online, 
so I just thought a similar autoreply tool may be handy.

Of course, it was intended mostly for newbies. Sorry if anyone found it 
annoying or even offensive. I turned it off now. But I wouldn't mind 
hearing from others as to what they think.

Sherzod

sql, query


-
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




Re: Mysql vs. Oracle and concat ||

2002-09-26 Thread sherzodr

 :I want to make a sql query in mysql, with a concat (||) known i Oracle
 :world.
 :
 :Like this.
 :
 :select numer ||','|| text from Table:

Instead, try the following:

  SELECT CONCAT(number, ',', text) FROM Table;




-
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




Is this a bug with comments? (fwd)

2002-08-20 Thread sherzodr


If i have a single quote (') inside the /* */ comments,
it gives me a syntax error. Why?

Thanks

-- 
sherzodR


sql, query




-
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




Re: resizing images in blobs

2002-07-04 Thread sherzodr


 :Lets say the image is 400 x 300 px and I would like tor resize the image to
 :40 x 30.
 :Is there a way without php or similar?

Go with ImageMagick. It has a imaging resizing and cropping functions

 :
 :Maybe someone has done this already and can give me a hint on that.
 :
 :Thanx in advance,
 :
 :Andy
 :
 :query
 :
 :
 :-
 :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
 :
 :


-
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




Re: How do i connect my Java Program to a remote MYSQL

2002-06-13 Thread sherzodr


%@ page import=java.sql.* % 
   Connection connection = null;
   Class.forName(org.gjt.mm.mysql.Driver).newInstance();
   connection = DriverManager.getConnection(
 
jdbc:mysql://localhost/sherzodr_cdbaza?user=sherzodr_cdbazapassword=PASSWORD 
HERE);


You see, if you actually spend a tlittle more effort you can find answers to all 
of your questions




 On Fri, 14 Jun 2002, Arul wrote:

 :Hi All
 :
 :How do i connect to mysql on a remote machine..
 :Is there any client tools available
 :
 :Regards,
 :-Arul
 :
 :sql,query
 :
 :
 :-
 :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
 :
 :


-
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




Re: Speed difference

2002-02-04 Thread Sherzod Ruzmetov aka sherzodR

  :  after timing the program that was targeting MySQL on different platforms
  : the results are (client program running always from the same box that is not
  : hosting MySQL):
  :
  :  Windows NT  - 25 sec (Intel P-III)
  :  Linux   - 27 sec (Intel P-III)
  :  Solaris 2.7 - 1 min 40 sec (Ultra 5)
  :  Solaris 2.7 - 1 min 32 sec (Ultra 10)
  :
  :  Is there a reasonable explanation why is this happening.
  :


Well, even though you run the same benchmark on the same machine several
times, you'll get different results. So we also need to know if adequate
iterations have been performed. So the time difference in the first two
results aren't that much different at all. The same conclusion is true
about the last two, But the slowness of Solaris boxes does impress me.

So I believe (i'm not a solaris dude) Ultra is the processor, right? Then
we could conclude that pentiums are much more faster then Ultras. Do you
aggree?


-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: Adding an incremented id field

2001-12-29 Thread Sherzod Ruzmetov aka sherzodR


  : I've got a database already populated with data and need to add a
  : sequential numerical id field as a key. (as one would with an auto
  : increment field)
  :
  : Is there a straightforward sql statement that will do this?


ALTER TABLE t_name ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY
KEY;



-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




I can't think....

2001-12-25 Thread Sherzod Ruzmetov aka sherzodR


I have a column with a date in the future. Trying to figure out a query
that would tell me how many days, mins left till that date.
I'm realy tired, and can't think right now :(



-
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




Re: DBD::mysql

2001-12-20 Thread sherzodR


Try to install it using .rpm. I believe Redhat and Madrake packages all
have perl-mysql libraries.


Good luck

franky wrote:

  franky: I have all the time the same error, I try different value but nothing is
  franky: right!
  franky: in the Perl Makefile.PL command i receive this message:
  franky: Checking if your kit is complete...
  franky: Looks good
  franky: Note (probably harmless): No library found for -lz
  franky: Using DBI 1.18 installed in
  franky: /usr/local/lib/perl5/site_perl/5.6.1/i586-linux/auto/DBI
  franky: Writing Makefile for DBD::mysql
  franky:
  franky: the problème is the libs?! but what can i do?!
  franky:
  franky: thanks!
  franky:
  franky: Franky
  franky: [EMAIL PROTECTED]
  franky:
  franky:
  franky: -
  franky: Before posting, please check:
  franky:http://www.mysql.com/manual.php   (the manual)
  franky:http://lists.mysql.com/   (the list archive)
  franky:
  franky: To request this thread, e-mail [EMAIL PROTECTED]
  franky: To unsubscribe, e-mail 
[EMAIL PROTECTED]
  franky: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  franky:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Amazon.com clone

2001-12-19 Thread sherzodR


Hello list

I've been working on Amazon clone for a client, except it doesn't sell
books, but helps them to advertise. You can take a look at it at:

http://www.ultracgis.com/UltraBooks

The client vanished into thin air, and now I am left with this program,
and don't konw what I can do with it. So was woundering if anyone would be
interested. It comes with a control panel, from where you can control
virtually anything (skins, users, admins, system settings, title,
descirption, categories etc.). Members also have an access to the control
panel but under limited priveleges.

If you're interested, let me know, i'll send you admin password, and I can
finish it the way you want. Price is reasonable. We also provide free
service after the purchase of the application and many more...

Currently its linked to PayPal w/ IPN documentation, but if you have a
merchant account or anything like that, i can modify it accordingly

Basic requirements:

OS: Windows, Solaris, Linux
 - Perl 5.0 or better
 - MySQL 3.22 or better

Perl modules:
 - DBI/DBD::mysql bundle
 - Storable 1.013 or better

Let me know


-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++





-
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




Re: Decrypting PASSWORD() from MySQL

2001-12-19 Thread sherzodR


  zach: How can I retrieve the decrypted password in a SELECT statement?

You can't!

If you want them to deal with forgotten passwords, here is a standard way:

Whenever they submit their email addresses to retrieve their passwords,
just generate a random password, and send it to the user's email address.
Then store the same password in encrypted form in the database. If they
want.

When it comes to be able to retrieve encrypted passwords, if it was
possible, it would defeat the whole purpose of encryption, wouldn't it?



 zach:
  zach: For example, the following results in retrieving the encrypted password.
  zach:
  zach: $result = mysql_query(SELECT userName,password,email FROM members WHERE
  zach: email='$email');
  zach: if (!$result)
  zach: echo pCould not execute database query:br .
  zach:   mysql_error() . /p;
  zach:
  zach: $row = mysql_fetch_array($result);
  zach: $userName = $row[userName];
  zach: $password = $row[password];
  zach: $email = $row[email];
  zach:
  zach:
  zach: Thank you.
  zach:
  zach:
  zach: Zach Curtis
  zach: Programmer/Analyst
  zach: POPULUS
  zach:
  zach:
  zach: -
  zach: Before posting, please check:
  zach:http://www.mysql.com/manual.php   (the manual)
  zach:http://lists.mysql.com/   (the list archive)
  zach:
  zach: To request this thread, e-mail [EMAIL PROTECTED]
  zach: To unsubscribe, e-mail 
[EMAIL PROTECTED]
  zach: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  zach:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: Decrypting PASSWORD() from MySQL

2001-12-19 Thread sherzodR


Hmm, I can't aggree with having two password columns, one raw password and
another is encrypted. It just doesn't make any sence. Why do you need to
encrypt the password in that case, don't you still have the original
password in yoru database? It just defeats the whole purpose of
authentication. So don't do that. Keep one password, in encrypted form,
that's it.

William R. Mussatto wrote:

  mussat: On Wed, 19 Dec 2001, Matt Wagner wrote:
  mussat:
  mussat:  Date: Wed, 19 Dec 2001 13:51:30 -0600 (CST)
  mussat:  From: Matt Wagner [EMAIL PROTECTED]
  mussat:  To: Zach Curtis [EMAIL PROTECTED]
  mussat:  Cc: [EMAIL PROTECTED]
  mussat:  Subject: Re: Decrypting PASSWORD() from MySQL
  mussat: 
  mussat:  Zach Curtis writes:
  mussat:   I have a form for a user to request their forgotten username and 
password by
  mussat:   entering their email address. I then process this using PHP and use 
mail()
  mussat:   to send them their username and password. However, the password is 
stored in
  mussat:   an encrypted PASSWORD('password') field in the MySQL table. How can I
  mussat:   retrieve the decrypted password in a SELECT statement?
  mussat: 
  mussat:  Zach,
  mussat: 
  mussat:  You cannot do this. PASSWORD() is one-way.
  mussat: 
  mussat:  What you have to do is have two fields, 'passwd' and 'epasswd', with
  mussat:  'passwd' being clear-text, the other being encrypted (with PASSWORD()
  mussat:  or other).
  mussat: 
  mussat:  If you want to obscure the clear-text field in a decodable fashion,
  mussat:  then check out the ENCODE()/DECODE() functions.
  mussat: 
  mussat:  Note, in MySQL 4.x there will be two new functions,
  mussat:  DES_ENCRYPT()/DES_DECRYPT().
  mussat: I have read that DES is considered at or approaching the end of its
  mussat: useful life and  other encryption algorythms are now recommended.
  mussat:
  mussat: 
  mussat:  Matt
  mussat: 
  mussat:  --
  mussat:  For technical support contracts, visit https://order.mysql.com/
  mussat: __  ___ ___   __
  mussat:/  |/  /_ __/ __/ __ \/ /Mr. Matt Wagner [EMAIL PROTECTED]
  mussat:   / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Herr Direktor
  mussat:  /_/  /_/\_, /___/\___\_\___/   Hopkins, Minnesota  USA
  mussat: ___/   www.mysql.com
  mussat: 
  mussat: 
  mussat:  -
  mussat:  Before posting, please check:
  mussat: http://www.mysql.com/manual.php   (the manual)
  mussat: http://lists.mysql.com/   (the list archive)
  mussat: 
  mussat:  To request this thread, e-mail [EMAIL PROTECTED]
  mussat:  To unsubscribe, e-mail [EMAIL PROTECTED]
  mussat:  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  mussat: 
  mussat:
  mussat: Sincerely,
  mussat:
  mussat: William Mussatto, Senior Systems Engineer
  mussat: CyberStrategies, Inc
  mussat: ph. 909-920-9154 ext. 27
  mussat:
  mussat:
  mussat: -
  mussat: Before posting, please check:
  mussat:http://www.mysql.com/manual.php   (the manual)
  mussat:http://lists.mysql.com/   (the list archive)
  mussat:
  mussat: To request this thread, e-mail [EMAIL PROTECTED]
  mussat: To unsubscribe, e-mail 
[EMAIL PROTECTED]
  mussat: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  mussat:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: relationships between databases

2001-12-17 Thread sherzodR


You need to have some sort of unique identifier, like a primary key.
And all the tables should agree upon that

Defryn, Guy wrote:

DG: Date: Tue, 18 Dec 2001 10:37:41 +1300
DG: From: Defryn, Guy [EMAIL PROTECTED]
DG: To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
DG: Subject: relationships between databases
DG:
DG:
DG:
DG: This is my first post to the list
DG:
DG: What is the best way of making a relationship between tables in Mysql.
DG: Do you set it up when you are creating the tables or is it done with the
DG: insert statement
DG:
DG: I am a newbie to Mysql, BTW
DG:
DG: Guy
DG:
DG: -
DG: Before posting, please check:
DG:http://www.mysql.com/manual.php   (the manual)
DG:http://lists.mysql.com/   (the list archive)
DG:
DG: To request this thread, e-mail [EMAIL PROTECTED]
DG: To unsubscribe, e-mail 
[EMAIL PROTECTED]
DG: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
DG:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: Order By number of rows returned ?

2001-12-14 Thread sherzodR


Create temporary files instead, in that  case you don't have to worry
about DROPing the tables, they will get dropped as soon as the mysql
session is closed.


 Girish Nath wrote:

GN: Date: Fri, 14 Dec 2001 15:29:38 -
GN: From: Girish Nath [EMAIL PROTECTED]
GN: To: Johnny Withers [EMAIL PROTECTED], [EMAIL PROTECTED]
GN: Subject: Re: Order By number of rows returned ?
GN:
GN: Hi
GN:
GN: Thanks for that, it works really well :)
GN:
GN: Best Regards
GN:
GN:
GN: Girish
GN:
GN:
GN: - Original Message -
GN: From: Johnny Withers [EMAIL PROTECTED]
GN: To: 'Girish Nath' [EMAIL PROTECTED]; [EMAIL PROTECTED]
GN: Sent: Friday, December 14, 2001 3:03 PM
GN: Subject: RE: Order By number of rows returned ?
GN:
GN:
GN:  I'm not sure if you can do this all in one query..
GN:  I tried a few JOINs, and nothing seemed to work.
GN:  However, I'm not up to speed on how to join things
GN:  together to get the best results.
GN: 
GN:  However, you can do it by creating a temp table:
GN: 
GN:  create table tmp01(
GN:  web_account char(4) not null default '',
GN:  count_wa int unsigned not null default 0
GN:  );
GN: 
GN:  INSERT INTO tmp01(web_account,count_wa)
GN:  SELECT web_account,count(web_account) AS count_wa
GN:  FROM lookup
GN:  GROUP BY web_account
GN:  ORDER BY count_wa DESC;
GN: 
GN:  SELECT lookup.web_account,lookup.code_short
GN:  FROM lookup,tmp01
GN:  WHERE (lookup.web_account=tmp01.web_account)
GN:  ORDER BY tmp01.count_wa DESC;
GN: 
GN:  DROP table tmp01;
GN: 
GN: 
GN:  This is probably not the best solution to your problem.
GN: 
GN:  -
GN:  Johnny Withers
GN:  [EMAIL PROTECTED]
GN:  p. 601.853.0211
GN:  c. 601.209.4985
GN: 
GN:  -Original Message-
GN:  From: Girish Nath [mailto:[EMAIL PROTECTED]]
GN:  Sent: Friday, December 14, 2001 7:13 AM
GN:  To: [EMAIL PROTECTED]
GN:  Subject: Order By number of rows returned ?
GN: 
GN: 
GN:  Hi
GN: 
GN:  I'm trying to do some sorting by relevance on a query. Essentially, i'd
GN:  like
GN:  to know if there is way to order the results by number of rows returned
GN:  or
GN:  if this is the best i can get and do the rest within PHP?
GN: 
GN:  mysql SELECT web_account, code_short FROM lookup WHERE code_short IN
GN:  ('U',
GN:  'S', 'G');
GN: 
GN:  +-++
GN:  | web_account | code_short |
GN:  +-++
GN:  | A007| U  |
GN:  | A007| S  |
GN:  | J009| G  |
GN:  | J009| U  |
GN:  | J009| S  |
GN:  | B001| U  |
GN:  +-++
GN:  6 rows in set (0.00 sec)
GN: 
GN:  I'd like to order these so that J009 would be grouped at the top of
GN:  the
GN:  set because it was found in 3 rows, A007 would be placed after J009
GN:  with
GN:  B001 last.
GN: 
GN:  Any ideas :) ?
GN: 
GN:  Thanks for your time.
GN: 
GN: 
GN: 
GN:  Girish
GN: 
GN: 
GN:  -
GN:  Before posting, please check:
GN: http://www.mysql.com/manual.php   (the manual)
GN: http://lists.mysql.com/   (the list archive)
GN: 
GN:  To request this thread, e-mail [EMAIL PROTECTED]
GN:  To unsubscribe, e-mail
GN:  [EMAIL PROTECTED]
GN:  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
GN: 
GN: 
GN: 
GN:  -
GN:  Before posting, please check:
GN: http://www.mysql.com/manual.php   (the manual)
GN: http://lists.mysql.com/   (the list archive)
GN: 
GN:  To request this thread, e-mail [EMAIL PROTECTED]
GN:  To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
GN:  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
GN: 
GN:
GN:
GN:
GN: -
GN: Before posting, please check:
GN:http://www.mysql.com/manual.php   (the manual)
GN:http://lists.mysql.com/   (the list archive)
GN:
GN: To request this thread, e-mail [EMAIL PROTECTED]
GN: To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
GN: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
GN:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |

Re: Table Exists

2001-12-14 Thread sherzodR


If you want to check before creating a table:

CREATE TABLE IF NOT EXISTS table_name;

If you want to do it before deleting:

DELETE TABLE IF  EXISTS table_name;



[EMAIL PROTECTED] wrote:

: Date: Fri, 14 Dec 2001 11:34:26 -0500
: From: [EMAIL PROTECTED]
: To: [EMAIL PROTECTED]
: Subject: Table Exists
:
: What is the easiest way to check if a table exists in the current
: database?  I checked the documentation, and couldn't find anything (but
: maybe I missed it).
:
: Glen
:
: -
: 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
:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++



-
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




Re: sub selects

2001-12-14 Thread sherzodR


As far as I know, not yet


Joel Wickard wrote:

JW: Date: Fri, 14 Dec 2001 12:50:39 -0800
JW: From: Joel Wickard [EMAIL PROTECTED]
JW: To: [EMAIL PROTECTED]
JW: Subject: sub selects
JW:
JW: can you perform sub selects in mysql?
JW:
JW:
JW: -
JW: Before posting, please check:
JW:http://www.mysql.com/manual.php   (the manual)
JW:http://lists.mysql.com/   (the list archive)
JW:
JW: To request this thread, e-mail [EMAIL PROTECTED]
JW: To unsubscribe, e-mail 
[EMAIL PROTECTED]
JW: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
JW:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: dbi accessor for mysql_insertid

2001-12-14 Thread sherzodR


$dbh-mysql_insertid()



Rich Duzenbury wrote:

RD: Date: Fri, 14 Dec 2001 14:15:36 -0600
RD: From: Rich Duzenbury [EMAIL PROTECTED]
RD: To: [EMAIL PROTECTED]
RD: Subject: dbi accessor for mysql_insertid
RD:
RD: Statement handles appear to have an accessor method to return the last
RD: insert id:
RD: $new_id = $sth-insertid;
RD:
RD: But I cannot seem to locate one for the database handle.  The closest I
RD: have found is the
RD: $new_id = $dbh-{'mysql_insertid'};
RD:
RD: In the case of a $dbh-do(...) where there is no statement handle, I have
RD: been using the above.
RD:
RD: I'm concerned about writing code for the long term that references the
RD: internals of an object.  Is this guaranteed to stay this way forever?  Or,
RD: is there an accessor method on the database handle that I am not aware of?
RD:
RD: Regards,
RD: Rich
RD:
RD:
RD: -
RD: Before posting, please check:
RD:http://www.mysql.com/manual.php   (the manual)
RD:http://lists.mysql.com/   (the list archive)
RD:
RD: To request this thread, e-mail [EMAIL PROTECTED]
RD: To unsubscribe, e-mail 
[EMAIL PROTECTED]
RD: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RD:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: dbi accessor for mysql_insertid

2001-12-14 Thread sherzodR


DBI Version: 1.19
DBD::mysql Version: 2.0416



Rich Duzenbury wrote:

RD: Date: Fri, 14 Dec 2001 19:45:02 -0600
RD: From: Rich Duzenbury [EMAIL PROTECTED]
RD: To: sherzodR [EMAIL PROTECTED]
RD: Cc: [EMAIL PROTECTED]
RD: Subject: Re: dbi accessor for mysql_insertid
RD:
RD: DBI version 1.15
RD: DBD::mysql version 2.0416
RD:
RD: Blows up on trying to use $dbh-mysql_insertid():
RD: Can't locate object method mysql_insertid via package DBI::db (perhaps
RD: you forgot to load DBI::db?
RD:
RD: Would you mind telling me what version you are running?  Thank you.
RD:
RD: Regards,
RD: Rich
RD:
RD:
RD: At 03:36 PM 12/14/01, sherzodR wrote:
RD:
RD: $dbh-mysql_insertid()
RD: 
RD: 
RD: 
RD: Rich Duzenbury wrote:
RD: 
RD:  RD: Date: Fri, 14 Dec 2001 14:15:36 -0600
RD:  RD: From: Rich Duzenbury [EMAIL PROTECTED]
RD:  RD: To: [EMAIL PROTECTED]
RD:  RD: Subject: dbi accessor for mysql_insertid
RD:  RD:
RD:  RD: Statement handles appear to have an accessor method to return the
RD:  last
RD:  RD: insert id:
RD:  RD: $new_id = $sth-insertid;
RD:  RD:
RD:  RD: But I cannot seem to locate one for the database handle.  The
RD:  closest I
RD:  RD: have found is the
RD:  RD: $new_id = $dbh-{'mysql_insertid'};
RD:  RD:
RD:  RD: In the case of a $dbh-do(...) where there is no statement
RD:  handle, I have
RD:  RD: been using the above.
RD:  RD:
RD:  RD: I'm concerned about writing code for the long term that
RD:  references the
RD:  RD: internals of an object.  Is this guaranteed to stay this way
RD:  forever?  Or,
RD:  RD: is there an accessor method on the database handle that I am not
RD:  aware of?
RD:  RD:
RD:  RD: Regards,
RD:  RD: Rich
RD:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265

010010100101010101001100

++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++



-
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




Re: not in -- not exists

2001-12-13 Thread sherzodR


CREATE TABLE IF NOT EXISTS table_name (
id NOT NULL AUTO_INCREMENT PRIMARY KEY,
value VARCHAR(30) );



Mohamed Abd El-Samei Mohamed wrote:

MAEM: Date: Thu, 13 Dec 2001 13:59:46 +0200
MAEM: From: Mohamed Abd El-Samei Mohamed [EMAIL PROTECTED]
MAEM: To: [EMAIL PROTECTED]
MAEM: Subject: not in   --   not exists
MAEM:
MAEM: Dear all can anyone help me to use NOT IN
MAEM:
MAEM: or NOT EXISTS  command in mysql ..
MAEM:
MAEM: Thsnks
MAEM:
MAEM:
MAEM: Name : Mohamed Abd El-Samei Mohamed
MAEM: Title  : System Administrator
MAEM: Comp. : Soficom Communications S.A.E
MAEM: Tele. : 737-1952/3
MAEM: Fax   : 7547415
MAEM: E-mail: [EMAIL PROTECTED]
MAEM:
MAEM:
MAEM:
MAEM: -
MAEM: Before posting, please check:
MAEM:http://www.mysql.com/manual.php   (the manual)
MAEM:http://lists.mysql.com/   (the list archive)
MAEM:
MAEM: To request this thread, e-mail [EMAIL PROTECTED]
MAEM: To unsubscribe, e-mail 
[EMAIL PROTECTED]
MAEM: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MAEM:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: [OT] mod_perl and last_insert_id() (Was: sequence and nextval)

2001-12-13 Thread sherzodR


perl scripts running under mod_perl environment ( with the help of
Apache::Registry) will be using new database handler ($dbh) at each
connection, unless you install Apache::DBI, which keeps the database
handle open throughout the Apache process.



Etienne Marcotte wrote:

EM: Date: Thu, 13 Dec 2001 13:30:32 -0500
EM: From: Etienne Marcotte [EMAIL PROTECTED]
EM: To: Carsten H. Pedersen [EMAIL PROTECTED]
EM: Cc: Henrik Erlandsson [EMAIL PROTECTED],
EM:  [EMAIL PROTECTED]
EM: Subject: [OT] mod_perl and last_insert_id() (Was: sequence and
EM: nextval)
EM:
EM: If running mod_perl does this stay true???
EM:
EM: Isn't mod_perl using an already opened connection to do subsequent
EM: manipulations?
EM:
EM: Or when one perl script is using a connection is creates a new
EM: connection for each perl script that starts running and if a perl script
EM: finishes, it keeps that same db handle for the next perl script asking a
EM: connection? If this is the case than I magine last_insert_id will always
EM: return the good value..
EM:
EM: sorry if this is mod_perl related
EM:
EM: Etienne
EM:
EM: Carsten H. Pedersen wrote:
EM: 
EM:   Thanks, but how secure is this. Is it possible for two computers to do
EM:   the select at the same time, i.e. get the new incremented value?
EM:   Computer one insert, computer two insert, computer one select, computer
EM:   two select?
EM:  
EM:   If this is possible how can I solve this? To make the column that insert
EM:   the new nextval unique and then check for errors (non-unique insert) and
EM:   if error then re-ask for a new nextval? Is this the best solution?
EM:  
EM: 
EM:  It's not possible to mix up the values. The value returned
EM:  last_insert_id() is conncection specific, so each computer
EM:  will receive only the value that it generated.
EM: 
EM:  / Carsten
EM:  --
EM:  Carsten H. Pedersen
EM:  keeper and maintainer of the bitbybit.dk MySQL FAQ
EM:  http://www.bitbybit.dk/mysqlfaq
EM: 
EM:   Thanks / Henrik
EM:  
EM:   ---
EM:  
EM:   create table MySequence ( nextval  int(10) not null default '0'
EM:   auto_increment ) ;
EM:  
EM:   insert into MySequence values ('');
EM:   select LAST_INSERT_ID();
EM:  
EM:   is what I use
EM:  
EM:   M
EM:  
EM:   -Original Message-
EM:   From: Henrik Erlandsson [mailto:[EMAIL PROTECTED]]
EM:   Sent: 13 December 2001 15:41
EM:   To: [EMAIL PROTECTED]
EM:   Subject: sequence and nextval
EM:  
EM:  
EM:   Does the above functions exist in MySQL? If not, when do you think it's
EM:   going to be implemented and how can I simulate nextval the easiest way?
EM:  
EM:   / Thanks Henrik
EM: 
EM:  -
EM:  Before posting, please check:
EM: http://www.mysql.com/manual.php   (the manual)
EM: http://lists.mysql.com/   (the list archive)
EM: 
EM:  To request this thread, e-mail [EMAIL PROTECTED]
EM:  To unsubscribe, e-mail [EMAIL PROTECTED]
EM:  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
EM:
EM:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: SELECT'ing only 1st matching row

2001-12-13 Thread sherzodR

SELECT * FORM table_name WHERE ID IS NULL LIMIT 1;

Steve Osborne wrote:

SO: Date: Thu, 13 Dec 2001 12:47:26 -0800
SO: From: Steve Osborne [EMAIL PROTECTED]
SO: To: MySQL (E-mail) [EMAIL PROTECTED]
SO: Subject: SELECT'ing only 1st matching row
SO:
SO: Is there a way to SELECT only the first matching row of a query?  I would
SO: like to allow the registration of identical products (unique serial numbers
SO: / owned by one user), without the user having to re-enter all their data.
SO: I've set up a page that allows them to just enter their login info (username
SO: and password) and the serial number of the product they want to register.
SO: What I need to do is grab their product preferences to be duplicated in the
SO: new record, however is they have more than one registered product, it throws
SO: off my plan.  I only need one record to get the values that I need. (I know
SO: that duplicating values is not proper database form, however I need to allow
SO: the user to change their preferences on each owned product.)
SO:
SO: Any advice,
SO:
SO: Steve Osborne
SO: Database Programmer
SO: Chinook Multimedia Inc.
SO: [EMAIL PROTECTED]
SO:
SO:
SO: -
SO: Before posting, please check:
SO:http://www.mysql.com/manual.php   (the manual)
SO:http://lists.mysql.com/   (the list archive)
SO:
SO: To request this thread, e-mail [EMAIL PROTECTED]
SO: To unsubscribe, e-mail 
[EMAIL PROTECTED]
SO: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SO:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: retrieving an array of hashes from fetchall_arrayref()

2001-12-13 Thread sherzodR

JK: What I really want it to return however, is an array of hashes.  According
JK: to the Perl DBI API, this method does exactly that if you pass it a hash
JK: slice reference argument.  Can anyone provide some sample code for doing
JK: this?


my $rows = $dbh-selectall_hashref(SELECT * FROM table_name);
# voila!

for my $row ( @{ $rows } ) {
# now $row is a hashref
print value %{$rows};
print  \n;
}






JK:
JK: Thanks.
JK:
JK: Jani
JK:
JK:
JK: -
JK: Before posting, please check:
JK:http://www.mysql.com/manual.php   (the manual)
JK:http://lists.mysql.com/   (the list archive)
JK:
JK: To request this thread, e-mail [EMAIL PROTECTED]
JK: To unsubscribe, e-mail 
[EMAIL PROTECTED]
JK: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
JK:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: NOT NULL field accepting NULL

2001-12-12 Thread sherzodR


No, it's not accepting NULL if it was declared as NOT NULL.
It's just accepting an empty sting (  ).

CREATE TABLE test (t VARCHAR(10) NOT NULL);
INSERT INTO test SET t = NULL;
INSERT INTO test SET t = '';


First insert will tell you what you're waiting for. And the second one
will do what you're asking for.

Empty string is not NULL.


sreedhar wrote:

s: Date: Wed, 12 Dec 2001 19:12:41 +0530
s: From: sreedhar [EMAIL PROTECTED]
s: To: mysql [EMAIL PROTECTED]
s: Subject: NOT NULL field accepting NULL
s:
s: Hi All,
s:
s: In MySQL, Even i declared a field as NOT NULL it is accepting nulls .What
s: might be the
s: problem. please let me know.
s:
s: regards,
s: sreedhar
s:
s:
s: -
s: Before posting, please check:
s:http://www.mysql.com/manual.php   (the manual)
s:http://lists.mysql.com/   (the list archive)
s:
s: To request this thread, e-mail [EMAIL PROTECTED]
s: To unsubscribe, e-mail [EMAIL PROTECTED]
s: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
s:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++



-
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




Re: efficient DELETE query - 2 tables

2001-12-09 Thread sherzodR


I spent some time to do it w/ one query, but I couldn't figure out. So
I am throwing an example in Perl (the best way I could think of)

my $pending = $dbh-selectrow_arrayref(qq/
SELECT pending_2.ordno
FROM pending_2, ordersearch_2
WHERE pending_2.ordno=ordersearch_2.ordno/);

for ( @{$pending} ) {
$dbh-do(DELETE FROM pending_2 WHERE ordno=?, undef, $_);
}

take care






rory o'connor wrote:

ro: Date: Sun, 9 Dec 2001 23:40:03 -0600
ro: From: rory o'connor [EMAIL PROTECTED]
ro: To: [EMAIL PROTECTED]
ro: Subject: efficient DELETE query - 2 tables
ro:
ro: I want to write an efficient query that will delete all records from one
ro: table when they show up in another table (pending shipments -- shipped
ro: shipments).  I can't do it with this:
ro:
ro: mysql DELETE from pending_2 WHERE pending_2.ordno = ordersearch_2.ordno;
ro:
ro: because you can only refer to columns of one table in a delete query.  Does
ro: anybody have an effiecnt way for me to do this with Perl DBI?
ro:
ro: Thanks!
ro:
ro: Rory
ro:
ro: -
ro: Before posting, please check:
ro:http://www.mysql.com/manual.php   (the manual)
ro:http://lists.mysql.com/   (the list archive)
ro:
ro: To request this thread, e-mail [EMAIL PROTECTED]
ro: To unsubscribe, e-mail 
[EMAIL PROTECTED]
ro: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ro:

-- 
Sherzod Ruzmetov [EMAIL PROTECTED]
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


-
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




Re: ALTER TABLE error

2001-12-06 Thread sherzodR



It means you're connecting to the server as an annonymous user.
If you have a username to connect to the server, run the following
query:

mysql show grants for your_user_name@localhost;

and it will show you all the priveleges that you have for specific
databases and tables. That's the best way to figure out what happened.
If it says that you do not have ALTER privelege for 'dbname', then
update the grants for yourself, or ask your ISP to do that if you
dont have su access

-- 


The road to hell is paved with melting snowballs.
 -- Larry Wall in  [EMAIL PROTECTED]

Carl Troein wrote:

CT:
CT: Steve Osborne writes:
CT:
CT:  ERROR 2000: Access denied for user: '@localhost' to database 'dbname'
CT: 
CT:  Can anyone give me some insight as to why I cannot do this?  Do I require
CT:  root privileges to do this (right now I am logged in as a user, as this
CT:  remote server is an ISP)?
CT:
CT: What unix user you are is irrelevant. However, what MySQL user
CT: you are is not. You should read the chapters on privileges and
CT: security, and ask your ISP to do so too. You shouldn't be able
CT: to connect as the anonymous user.
CT:
CT: BTW, your clock is off by ~65 minutes.
CT:
CT: //C
CT:
CT:



-
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




Re: Creating MySQL table w/2 primary keys

2001-12-06 Thread sherzodR


As far as I know, you can't do tht. What you could do instead is
have one Primary Key col and make another one UNIQUE.

I did that several times, and it does work!

-- 

What they need to teach in school is for people to think for themselves.  :-)
 -- Larry Wall in [EMAIL PROTECTED]

Demirchyan Oganes-AOD098 wrote:

DO: Hello everyone,
DO:
DO: I have this create table statement,
DO:
DO: drop table IF EXISTS GROUP_CONCLUSION_GROUPING CASCADE;
DO:
DO: CREATE TABLE IF NOT EXISTS GROUP_CONCLUSION_GROUPING(
DO: ANALYSIS_RESULT_ID MEDIUMINT(20)  PRIMARY KEY REFERENCES   
PAD_ANALYSIS_RESULT(ANALYSIS_RESULT_ID),
DO: GROUP_CONCLUSION_IDMEDIUMINT(20)  PRIMARY KEY REFERENCES   
GROUP_CONCLUSION(GROUP_CONCLUSION_ID)
DO:
 ) Type=InnoDB;
DO:
DO: where I want to create table with 2 primary keys, but it won't let me.
DO:
DO: How could I do it.
DO:
DO: Regards,
DO:
DO: Oganes Demirchyan
DO: Motorola Life Science
DO: 757 S.Raymond
DO: Pasadena, CA  91105
DO: Tel: 626-584-5900
DO: email: [EMAIL PROTECTED]
DO:
DO:
DO: -
DO: Before posting, please check:
DO:http://www.mysql.com/manual.php   (the manual)
DO:http://lists.mysql.com/   (the list archive)
DO:
DO: To request this thread, e-mail [EMAIL PROTECTED]
DO: To unsubscribe, e-mail 
[EMAIL PROTECTED]
DO: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
DO:


-
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




Re: File storage

2001-12-06 Thread sherzodR



Try to browse the database of this list, there was a huge conversation on
that about 6-7 month ago.



-- 

The way I see it, if you declare something portable, you'll always be
wrong, and if you declare it non-portable, you'll always be right.  :-)
 -- Larry Wall in [EMAIL PROTECTED]

Phan Anh Tran wrote:

PAT: Please discuss the pros and cons of storing a file and its meta data in the
PAT: database vs file in the filesystem and the metadata in the database.
PAT:
PAT: File + Metadata in DB
PAT: 1. Can participate in transaction.
PAT: 2. Does not get out of sync.
PAT: 3. Overhead of fetching the file.
PAT:
PAT: File in Filesystem and Metadata in DB
PAT: 1. File and metadata may get out of sync.
PAT: 2. Less overhead.
PAT:
PAT: Any other good points?  I am looking especially for pros for File+Metadata
PAT: in DB...
PAT:
PAT: Yeah, not really mysql specific, but I think people may find it interesting
PAT: anyway.
PAT:
PAT: Thanks,
PAT: Anh
PAT:
PAT:
PAT:
PAT:
PAT: _
PAT: Do You Yahoo!?
PAT: Get your free @yahoo.com address at http://mail.yahoo.com
PAT:
PAT:
PAT: -
PAT: Before posting, please check:
PAT:http://www.mysql.com/manual.php   (the manual)
PAT:http://lists.mysql.com/   (the list archive)
PAT:
PAT: To request this thread, e-mail [EMAIL PROTECTED]
PAT: To unsubscribe, e-mail 
[EMAIL PROTECTED]
PAT: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
PAT:


-
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




Re: html ina text feild

2001-11-30 Thread sherzodR

No, you don't have to change the type of field. If you want more HTML
embedded, you could save those HTMLs together w/ the text in your
database, or... if you just want the br / tags, then, assuming your
text has a new line character (\n), you have to do some sort of substitution.

Forexample, in Perl you could do the following:

my $text = $dbh-selectrow_array(SELECT text_field FROM table_name WHERE id=?, 
undef, $id);

$text =~ /\n/br/g;



Webmaster wrote:

W: I've set up a database with a text feild and want to call that
W: information with html code embeded into the text( eg. br). Do I need
W: to change the type of field ?. At the moment the html code is being
W: returned as plain text.
W:
W:
W:
W: -
W: Before posting, please check:
W:http://www.mysql.com/manual.php   (the manual)
W:http://lists.mysql.com/   (the list archive)
W:
W: To request this thread, e-mail [EMAIL PROTECTED]
W: To unsubscribe, e-mail [EMAIL PROTECTED]
W: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
W:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




re: mysqldump: problem/question

2001-11-30 Thread sherzodR


So what was the problem?




Weaver, Walt wrote:

WW: Okay, I know you guys have been wracking your brains for the last two days
WW: trying to solve my problem of mysqldump running out of memory while dumping
WW: a large table.
WW:
WW: I figured it out, so you can all go on with your lives.
WW:
WW: My copy of Paul DuBois' MySQL book came today and immediately solved my
WW: problem.
WW:
WW: Cool book. Now I have something to do this weekend.
WW:
WW: Thanks,
WW: --Walt Weaver
WW:   Bozeman, Montana
WW:   Oracle smart, MySQL dumb (for now)
WW:
WW: -
WW: Before posting, please check:
WW:http://www.mysql.com/manual.php   (the manual)
WW:http://lists.mysql.com/   (the list archive)
WW:
WW: To request this thread, e-mail [EMAIL PROTECTED]
WW: To unsubscribe, e-mail 
[EMAIL PROTECTED]
WW: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
WW:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: to many connections, how to optimize them?

2001-11-30 Thread sherzodR


Every connection will carry some overhead cost. So you'll have to
connect as few times as possible.


Jerry wrote:

J: Hi!
J:
J: I have a problem! Too many connections error in myODBC.
J:
J: I am wondering now how to optimize the code...
J:
J: What is better, to make 14 open.comm and close.conn on a web page or to open
J: once and close once?
J:
J: Asked differently, is it better to connect to database one and be connected
J: until all code is generated or is it better to connect for every piece of
J: information that is needed?
J:
J: What should I also be looking for in optimizing my pages? I don't have near
J: 100 users simultaniously accessing database!
J:
J: Yours
J:
J: Jerry
J:
J:
J: -
J: Before posting, please check:
J:http://www.mysql.com/manual.php   (the manual)
J:http://lists.mysql.com/   (the list archive)
J:
J: To request this thread, e-mail [EMAIL PROTECTED]
J: To unsubscribe, e-mail [EMAIL PROTECTED]
J: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
J:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: update date problem

2001-11-30 Thread sherzodR



UPDATE your_table SET your_col = CONCAT(your_col, fff);





nut sss wrote:

ns: can i do this?
ns:content in field=aaa,bbb,ccc,hhh
ns:new content=aaa,bbb,ccc,hhh,fff
ns:can i  append new word fff into the old field .by
ns: use update command in 1 query :)
ns: it's like
ns: UPDATE persondata SET age=age+1
ns: but i want to append new value into old field...
ns: what should i do .
ns: help me help me plsss  ^_^
ns:
ns:
ns: __
ns: Do You Yahoo!?
ns: Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
ns: http://geocities.yahoo.com/ps/info1
ns:
ns: -
ns: Before posting, please check:
ns:http://www.mysql.com/manual.php   (the manual)
ns:http://lists.mysql.com/   (the list archive)
ns:
ns: To request this thread, e-mail [EMAIL PROTECTED]
ns: To unsubscribe, e-mail 
[EMAIL PROTECTED]
ns: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ns:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: Getting id asignet to an insert

2001-11-30 Thread sherzodR

I am not quite sure, but the only I could think of is the table locking.
Just lock those two tables at the time of transaction, and release the lock
as soon as you're done. I am sure people out here might have more
sophisticated solutions... in which case i'd like to be aware of that too

( I believe LAST_INSERT_ID() of table A will not be available in
table B, will it?)


Javier Armendáriz wrote:

JA: Hi everybody:
JA:
JA: Can anybody tellme how can y get the id asigned to a record in the moment i
JA: insert data in the database?
JA:
JA: I need to storage transaction requests, the mysql database assigns an unique
JA: id (auto increment) to that record, and i need it to continue saving data in
JA: another table.
JA:
JA: Is there a method for doing this whitou problems of concurrent users in the
JA: database???
JA:
JA: Tahnk a lot
JA:
JA:
JA: -
JA: Before posting, please check:
JA:http://www.mysql.com/manual.php   (the manual)
JA:http://lists.mysql.com/   (the list archive)
JA:
JA: To request this thread, e-mail [EMAIL PROTECTED]
JA: To unsubscribe, e-mail 
[EMAIL PROTECTED]
JA: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
JA:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: Comparing an alias ...

2001-11-30 Thread sherzodR


Try to use HAVING instead of WHERE. I hope that will help.





Julio Faerman wrote:

JF: Hi ... I am need the following query to work :
JF: SELECT
JF: min(my_colum) as MINIMAL_VALUE
JF: WHERE
JF: MINIMAL_VALUE  10
JF:
JF: The query is not EXACTLY as this one, but i think it is enough to get you
JF: the idea of my problem...
JF:
JF: Thnx for any  help !
JF: []~S
JF: julio
JF:
JF:
JF: -
JF: Before posting, please check:
JF:http://www.mysql.com/manual.php   (the manual)
JF:http://lists.mysql.com/   (the list archive)
JF:
JF: To request this thread, e-mail [EMAIL PROTECTED]
JF: To unsubscribe, e-mail 
[EMAIL PROTECTED]
JF: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
JF:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: Title counter

2001-11-30 Thread sherzodR

B: querys the database and returns the stories to a new page. How do I set
B: up a counter to record how many times that story has been read.All
B: stories are loaded into the database and the new page is the results of
B: the query.
B:

First off, what programming API are u using? Perl, C, PHP?

Anyways, whenever the query to retrieve the content is passed,
along w/ that query pass the following:

update cnt_table set count=count+1 where story_id=1341234

Good luck


-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: getting id or record just inserted

2001-11-29 Thread sherzodR



last_insert_id() should work

D
Alast_insert_id()
MG: recall something about @@Identity.  Does MySQL have something similar?  I
MG: know I can always just query Max(ID), but that's not always the safest bet.
MG:
MG: reply to [EMAIL PROTECTED] as I have not subscribed to the mailing
MG: list...yet.
MG:
MG: Thank you,
MG:
MG:
MG: Robert Matt Graham, Esq.
MG: Product Manager
MG: THE AGOS GROUP, LLC
MG: [EMAIL PROTECTED]
MG:
MG:
MG: -
MG: Before posting, please check:
MG:http://www.mysql.com/manual.php   (the manual)
MG:http://lists.mysql.com/   (the list archive)
MG:
MG: To request this thread, e-mail [EMAIL PROTECTED]
MG: To unsubscribe, e-mail 
[EMAIL PROTECTED]
MG: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MG:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: Newbie question

2001-11-29 Thread sherzodR


You could treate those delimited columsn just like
SET() columns and pass the following query:

SELECT * FROM cats WHERE category LIKE %christmas%;



Graham Nichols wrote:

GN: Hi,
GN:
GN: I have a table which contains a column 'category'
GN:
GN:
GN: 'category' can be made up as records such as:
GN:
GN: christmas|birthday|easter
GN: easter|thanksgiving
GN: birthday|christmas|thanksgiving|easter
GN:
GN: etc .
GN:
GN: As you can see, items are delimited with a '|' in the fields. If I wish to
GN: select all records which contain 'christmas', what is the correct sql syntax
GN: please?
GN: (This should return records 1 and 3 from the example shown above)
GN:
GN: I've tried several approaches, but have failed so far.
GN:
GN: Thanks for any pointers.
GN:
GN: kind regards,  Graham Nichols
GN:
GN:
GN:
GN: -
GN: Before posting, please check:
GN:http://www.mysql.com/manual.php   (the manual)
GN:http://lists.mysql.com/   (the list archive)
GN:
GN: To request this thread, e-mail [EMAIL PROTECTED]
GN: To unsubscribe, e-mail 
[EMAIL PROTECTED]
GN: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
GN:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: RESTORE ??? RE: NewBie Question; Backups?

2001-11-29 Thread sherzodR



You can restore it by just doing:

$ mysql dbname  dbnams.sql



ROGGER ALEXIS VASQUEZ MARTINEZ wrote:

:Thanks and
:How DO I RESTORE IT  ???
:
:
:mysqldump -uusername -ppassword -hhostname dbname  dbname.sql
:
:That will dump the database 'dbname' into the file 'dbname.sql'
:
:Tyler Longren
:

--
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: error codes question

2001-11-28 Thread sherzodR


Thanks a lot for the perror. However it doesn't seem to have descriptions
for some code (ex. 1046, 1064).

But still, it was really usefull (y MySQL book doesn't mention that, weird)




Cindy wrote:

C:
C: Bill Adams writes:
C:  Cindy wrote:
C:  
C:   I tried checking for error codes in the documentation, but didn't find
C:   anything particularly useful.
C:  
C:   I'm getting this:
C:   mysql load data infile '/export/home/Scratch/WordIndex.txt' into table wor
C:  dindex (aid, wid, wordform, start, length);
C:   ERROR 1030: Got error 28 from table handler
C:  
C:  Try perror 28 (under ./mysql/bin/perror)
C:
C: Oh -- thanks, that's good to know.  I hate these unlisted codes, but I
C: guess it's system dependent.
C:
C: I did find out the problem -- wasn't the tmpdir as someone else
C: helpfully suggested but it was close: it was the data directory...  I
C: moved it off to a larger partition, symlinked it back and voila!
C:
C: Thanks, all
C: --Cindy
C:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: source command problem

2001-11-28 Thread sherzodR


Well, Paul, i think he means using source in an .sql script.
Yes you can, Shankar. I used it several times for several reasons :)

And u can envoke your sql script the same as you use your other
scripts.


[EXAMPLE]

-- in query.sql file:

CREATE TABLE ( id INT, value CHAR(30) )

-- in source.sql file:

source query.sql

# or \. query.sql

[/EXAMPLE]

Then you can envoke your source.sql script the same way as you do others



Paul DuBois wrote:

PD:database,sql,query,table
PD: 
PD: 
PD: I notice that source is only accepted at the *command line*. This
PD: means that I can't source a script that sources another file.
PD: 
PD: I guess source is implemented in some special way that prevents it
PD: from being recursively used?
PD: 
PD: Is there a way to do what I want (have scripts call other scripts)?
PD: 
PD: Thx,
PD: --
PD: Shankar.
PD:
PD: SOURCE is a command understood by the mysql client program.  It's not
PD: part of the version of SQL understood by the client.  If you want to use
PD: SOURCE in your scripts, you'll have to parse them yourself and implement
PD: it on the client side.
PD:
PD: -
PD: Before posting, please check:
PD:http://www.mysql.com/manual.php   (the manual)
PD:http://lists.mysql.com/   (the list archive)
PD:
PD: To request this thread, e-mail [EMAIL PROTECTED]
PD: To unsubscribe, e-mail 
[EMAIL PROTECTED]
PD: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
PD:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: can i do this with sql?

2001-11-27 Thread sherzodR



i belive you want..:

SELECT * FROM your_table WHERE id  9 ORDER BY id LIMIT 9;

But when it comes to generating missing items... I'm not sure if
i got you right though, but they should exist. MySQL cannot
make the rows that do not exist



Jamie Burns wrote:

: Hi all,
:
: I have a table like this:
:
: iddatayear
:
: 1  201
: 2  201
: 6  201
: 7  201
: 8  201
: 11201
:
: What i want to be able to get is these results from an sql query (given that
: i want id's 1-9):
:
: iddatayear
:
: 1   201
: 2   201
: 3   00
: 4   00
: 5   00
: 6   201
: 7   201
: 8   201
: 9   00
:
: Basically it has made up the rows with id's 3,4, 5 and 9 because they didnt
: exist in the table.
:
: Can anybody give me any clues how to achieve this?
:
: Thanks,
:
: Jamie Burns.
:
:
: -
: 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
:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: How do temporary tables die?

2001-11-27 Thread sherzodR

You mean how they are dropped? temp tables are created for
each seperate process (session?). So as soon as the client
(or you program) ends the session, they should be
dropped



Morten Dreier wrote:

Morten: How do tamporary tables die? Is there a time limit, og do I have to drop
Morten: them manually?
Morten:

-- 
sherzodR [EMAIL PROTECTED]
use CGI::Session;


-
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




Re: mysql - search engines like query

2001-11-26 Thread sherzodR



For measuring relevance, you'll need to come up with our own weights and
algorithms. MySQL doesn't do that kinds of things. For more information,
read the documentation of Google at:

http://citeseer.nj.nec.com/brin98anatomy.html
or http://www7.scu.edu.au/programme/fullpapers/1921/com1921.htm

Cheers

--
sherzodR

On Mon, 26 Nov 2001, Giulio Borrini - Netbuilder wrote:

Hi guys,

is there a method in mysql to do a search engines like query and order the
results
by relevance?
i taken a look at MATCH ... AGAINST function but i'm not sure that it's what
i need and i'm also looking for somenthing simpler and faster...

any idea?
thanks in advance

-
Giulio Borrini
Web Programmer
Netbuilder snc Parma, Italy
-







-
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



-
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




Re: concatenate text content in column grouped by another column.

2001-11-26 Thread sherzodR



Does it throw an error message or output isn't what you expected?
In any event, did you try it with HAVING?

I couldn't notice anything wrong from what you have there


Cheers

-- 
sherzodR


On Mon, 26 Nov 2001, Eva Fransson wrote:

I have an application with many table joins and now I would like to get all
different Skills that every person in my resultset has concatenated to one
string.

I would like the code to work like this.

select concat_ws(, ,SkillName) as Skills, ..., ... from Skill, ..., ...
where ... and ... group by fkEmployeeID order by ... , ... limit 0,20;

But it dosn't! Is there some other way to fix this?

Eva Fransson


-
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



-
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




Re: Automatic joins

2001-11-26 Thread sherzodR




Well, you could do that with shell scripts (or batch files ).
Just write a query pleasing your heart's content, and save it in script
and ( or put it into your /bin ) run it whenever you need it.

As far as I know, MySQL doesnt' have such built-in feature ( I wish I was
wrong)


cheers
--
sherzodR


On Mon, 26 Nov 2001, Wakan wrote:

Hi,
I'd like to ask for a reply to this (I hope not stupid) question:
is there a way to set permanently relationship between tables,
so in that way when I ask for something, Mysql automatically
joins all tables involved in that relationship?
(Like MSAccess, for example)


-
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



-
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




Re: MySQL 4.0 fulltext search truncation bug?

2001-11-26 Thread sherzodR



Use % instead of *

cheers
--
sherzodR


On 26 Nov 2001, Harald Fuchs wrote:

According to the manual, section New Features of Full-text Search to
Appear in MySQL 4.0:

* `*' is a truncation operator.

The query
  SELECT COUNT(*) FROM documents WHERE MATCH(txt) AGAINST ('Versailles')
returns 2, but
  SELECT COUNT(*) FROM documents WHERE MATCH(txt) AGAINST ('Versaill*')
returns 0  on MySQL 4.0.

Is this a bug, or do I misunderstand the meaning of truncation?

-
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



-
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




Re: Date manipulation question .

2001-11-26 Thread sherzodR


Check out DATE_SUB() and DATE_ADD() functions. Those are the one to do
the trick.

sherzodR


On Mon, 26 Nov 2001, Julio Faerman wrote:

Hi !
I have a table with 2 coluns with  time values , for example, colum START
(2001-11-20 23:34:03 , for example) and STOP (2001-11-21 08:34:03 , for
example).
Given a interval of time, say 8 AM to 8 PM, i need my query to return the
total time between START and STOP outside this period.
Is this possible to be done with SQL ?
Thnx a lot !
Julio




-
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



-
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




Re: Date Manipulation.

2001-11-26 Thread sherzodR



Well, to do date calculations, use DATE_SUB() and DATE_ADD() functions.
To convert to some other functions, use DATE_FORMAT() function. For
templates that DATE_FORMAT() needs, please refer to documentation.
There're bunch of'em


--
sherzodR


On Mon, 26 Nov 2001, Thomas Spahni wrote:

On Mon, 26 Nov 2001, Julio Faerman wrote:

  Is there anything like a to_hours() function ?
  I need my query to to calculate how much time there is between two time
 values

Julio,

have a look at the UNIX_TIMESTAMP(date) and FROM_UNIXTIME(unix_timestamp)
functions. These allow to convert a date to seconds. Then you do your
maths, calculate a difference and convert back to any format you like.

Thomas


-
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



-
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




Re: Netscape not rendering correctly

2001-11-26 Thread sherzodR


Lotta peoploe do not use /td and /tr closing tags. It works fine in
IE, as it closes them automaticly whenever it sees the opening td and
tr. But Netscape turns up its nose. So it should do w/ the HTML syntax,
I believe. You could post a link to that page, if you wish, or have HTML
validator to validate it for you (available at w3c.org)

Good luck

--
sherzodR


On Mon, 26 Nov 2001, Amer Neely wrote:

I've read with interest the posts on Netscape not rendering HTML
correctly. I can add my experience to that thread, but I use Perl not
PHP to generate the HTML. Some very strange things happen with NS 4.77,
but IE5 renders just fine. It isn't tables in my case - I've confirmed
all table,tr,td, and form tags are matched.

The strange thing is it works fine when I run the script on my home
computer (WIN98, Apache, perl 5, MySQL 3.23.38). Upload to my ISP and
Netscape gives intermittent results - sometimes it will come back with a
complete page, other times (for the same query) it will stop partway
through the HTML.

An earlier post mentioned the possibility of the code having NUL
characters in the HTML stream. I'll try to check into that and post the
results. If someone can shed more light on this I know a lot of people
would appreciate it. Thanks in advance.



-
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




Re: Too many connections (again)

2001-11-26 Thread sherzodR



I keep getting that error too. But I couldn't figure out the cause. So I
just used Apache::DBI for persistent DB connection ( you can't do that
unless your scripts are running under mod_perl )

--
sherzodR


On Mon, 26 Nov 2001, Chris Mason wrote:

I have a lot of databased websites running on my server (1 Ghz P3/256
MB/20GB/RH7.1) and I am continually getting connection problems. None of the
sites are high volume, so I am surprised by this and I suspect that
connections are not being reused quickly enough.

Here's my config, can anyone help me sort this out?



[root@server1 /root]# vi /etc/my.cnf

[mysqld]
#datadir=/var/lib/mysql
datadir=/usr/mysql
#socket=/usr/mysql/mysql.sock
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib
max_connections=300

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


Chris Mason
[EMAIL PROTECTED]


-
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



-
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




Re: Annoying DBD-mySQL error wont go away

2001-11-26 Thread sherzodR


To be more specific, everytime you use $dbh-prepare(...), after you're
done with'em, do $sth-finish(); That should solve the problem.

Good luck

-- 
sherzodR

On Mon, 26 Nov 2001, Colin Faber wrote:

You've failed to close your prepare() statements with finish()

See the perldoc on DBI again.


Jaime Teng wrote:

 Hi,

 I have been pulling my hair due to this annoying error. x(

 
 DBI::db=HASH(0x1d2998c)-disconnect invalidates 1 active statement handle
 (either destroy statement handles or call finish on them before
 disconnecting)
 at C:\WEBSITE\script\default.pl line 721.
 

 It is a Perl CGI script and at line 721 is a simple disconnect command:

 721 $DBH-disconnect;
 722
 723 binmode STDOUT;
 724 print Content-type: text/html\cM\cJ;
 725 print Content-length: ,length($HTTP),\cM\cJ;
 726 print \cM\cJ;
 727 print $HTTP;

 The error message is straight forward and means that I have an open
 mySQL handle that is not closed; example:

 $sth=$DBH-prepare(SELECT ..);
 $sth-execute;
 $DBH-disconnect;   --- should have been a fetch before disconnect.

 But I am dead sure I have a result collector:
 $sth=$DBH-prepare(SELECT ..);
 $sth-execute;
 $result = $sth-fetchrow;

 I only use three functions: prepare, execute and fetchrow.

 For all intents and purposes, I have reviewed the script line per line
 and even made sure that each select will give only one result by adding
 LIMIT 1
 $sth=$DBH-prepare(SELECT .. LIMIT 1);

 arg!

 I am Perl built 626 on win2000. Mysql 3.23.37

 I have encountered this kind of errors on Linux+Apache before and I solved it
 via:
 $sth=$DBH-prepare(SELECT ..LIMIT 1);
 $sth-execute;
 while ( $result = $sth-fetchrow ) {1};

 It appeared to me that even if only one result is to be expected, mysql
 would throw more than one. or is this a problem with DBD-Mysql module?

 regards,
 Jaime

 -
 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

-
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



-
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