RE: Please help me.

2009-03-19 Thread Muthukumar Selvarasu
Hi

You can make a backup of the original table and recreate the table and
import. That will help you ASAP


Muthukumar Selvarasu,
Project Manager, Webmaster Ltd.

-Original Message-
From: Gary Smith [mailto:g...@primeexalia.com] 
Sent: Thursday, March 19, 2009 7:25 AM
To: Valentin Ionescu; mysql@lists.mysql.com
Cc: wi...@lists.mysql.com; mysql-h...@lists.mysql.com
Subject: RE: Please help me.

Velentin, 

http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html

Note the section for the droping of foreign keys used the contraint name,
not the key name.  Try this and see if it solves the first problem (of
removing the constraint).  Then you should be able to drop the column after
that.


From: Valentin Ionescu [colibry...@yahoo.com]
Sent: Wednesday, March 18, 2009 11:27 AM
To: mysql@lists.mysql.com
Cc: wi...@lists.mysql.com; mysql-h...@lists.mysql.com
Subject: Please help me.

Hi!
My name is Valentin and I am writing to you for the following problem:
I created a database containing the table:

CREATE TABLE `documents_ex` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `Journal_ex_ID` int(10) unsigned DEFAULT NULL,
  `Documents_ID` int(10) unsigned DEFAULT NULL,
  `Data` datetime DEFAULT NULL,
  `Nr` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `Journal_ex_ID` (`Journal_ex_ID`,`Documents_ID`,`Data`,`Nr`),
  KEY `Documents_ID` (`Documents_ID`),
  CONSTRAINT `documents_ex_ibfk_1` FOREIGN KEY (`Journal_ex_ID`) REFERENCES
`journal_ex` (`ID`) ON DELETE CASCADE,
  CONSTRAINT `documents_ex_ibfk_2` FOREIGN KEY (`Documents_ID`) REFERENCES
`documents` (`ID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1

After some time I decided to drop 'Journal_ex_ID' column and all its
environment from this non empty table.
All I tried to do like:

alter table documents_ex drop column Journal_ex_ID or alter table
documents_ex drop foreign key  Journal_ex_ID or alter table documents_ex
drop  key  Journal_ex_ID

 I receive the same error 150 and I don't know what to do.

Please help me.
 Best regards.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=g...@primeexalia.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:
http://lists.mysql.com/win32?unsub=muthukumar...@hotmail.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Please help me.

2009-03-18 Thread Gary Smith
Velentin, 

http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html

Note the section for the droping of foreign keys used the contraint name, not 
the key name.  Try this and see if it solves the first problem (of removing the 
constraint).  Then you should be able to drop the column after that.


From: Valentin Ionescu [colibry...@yahoo.com]
Sent: Wednesday, March 18, 2009 11:27 AM
To: mysql@lists.mysql.com
Cc: wi...@lists.mysql.com; mysql-h...@lists.mysql.com
Subject: Please help me.

Hi!
My name is Valentin and I am writing to you for the following problem:
I created a database containing the table:

CREATE TABLE `documents_ex` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `Journal_ex_ID` int(10) unsigned DEFAULT NULL,
  `Documents_ID` int(10) unsigned DEFAULT NULL,
  `Data` datetime DEFAULT NULL,
  `Nr` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `Journal_ex_ID` (`Journal_ex_ID`,`Documents_ID`,`Data`,`Nr`),
  KEY `Documents_ID` (`Documents_ID`),
  CONSTRAINT `documents_ex_ibfk_1` FOREIGN KEY (`Journal_ex_ID`) REFERENCES 
`journal_ex` (`ID`) ON DELETE CASCADE,
  CONSTRAINT `documents_ex_ibfk_2` FOREIGN KEY (`Documents_ID`) REFERENCES 
`documents` (`ID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1

After some time I decided to drop 'Journal_ex_ID' column and all its 
environment from this non empty table.
All I tried to do like:

alter table documents_ex drop column Journal_ex_ID
or
alter table documents_ex drop foreign key  Journal_ex_ID
or
alter table documents_ex drop  key  Journal_ex_ID

 I receive the same error 150 and I don't know what to do.

Please help me.
 Best regards.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=g...@primeexalia.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: please help me.

2006-06-02 Thread Daniel da Veiga

On 6/2/06, yuan edit [EMAIL PROTECTED] wrote:

 my operating system is linux redhat 9.0.
i am installing mysql 5.0.x binary distribution.
Which edition is the most fit in the following editions?


You notices most of those files are .asc and .md5 used to verify the
integrity of the archive after you download it, right? So, reduced to
3 versions to choose.


And would you like to tell me the difference among these editions?


You can search the MySQL site, and I would advice you to download it
from the site, not from this mirror that I never heard of. If you were
at the site, there are docs explaining the difference between each
version.

mysql-standard-5.0.22-linux-i686-glibc23.tar.gz
Compiled against glibc-2.3

mysql-standard-5.0.22-linux-i686-icc-glibc23.tar.gz
Compiled with ICC?! Dunno, never heard of it and its not at the
official MySQL site.

mysql-standard-5.0.22-linux-i686.tar.gz
Static linked, as far as I know.

I strongly advice you to:

1) Never copy and paste a whole web page in a mail.
2) Strip down what is unrelevant of text
3) Clean html tags
4) Learn about md5 and asc.
5) Be thankful that someone read all this blob and answered
6) Download MySQL from www.mysql.com

--
Daniel da Veiga
Computer Operator - RS - Brazil
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
--END GEEK CODE BLOCK--

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



Re: Please help me: Boolean fulltext searches, AND instead of OR

2005-08-23 Thread Michael Stassen

John thegimper wrote:

This is what i need:

Posted by gogman on Monday May 5 2003, @10:42am on the mysql website:

MySQL defaults to an 'OR'. Example: 'dog cat' = 'dog OR cat'. Most fulltext 
search engines default to an 'AND'. These include: AltaVista, Fast Search, 
Google, Hotbot, Lycos, Northern Light and Yahoo. Excite is an exception that 
defaults to an 'OR'. 


It's not clear to me that this is entirely accurate (Google, for example, is 
a relevance search 
http://www.google.com/support/bin/answer.py?answer=427topic=352), but I 
don't think web search engine front ends are particularly relevant in any case.



New Feature: set-variable = ft_boolean_default='AND'
vs 'OR'

('OR' would be the default setting so as to not break older code)

With a 'AND' default 'OR' would have to be explicit. Example: 'dog cat' = 'dog 
AND cat', 'dog OR cat' - requires 'OR' to be set.


Performance tests are indicating a 5-7 times increase in search speed 
with AND vs OR statements.


--

I have done some searches on google and found several people wanting to do the 
same... but no solutions.
 
Is there still no solution for this? Every large searchengine works like

this.


Why do you *need* this?  More to the point, why should mysql do this?

Honestly, I think you are confusing the user interface, the application, and 
the back end.  Your user interface is free to include a search box where the 
user can type 'dog cat' with the expectation that only documents containing 
both (AND) will be returned.  Your application needs to parse the request 
and send the proper query to mysql (the back end).  Mysql is just a useful 
tool.  It stores your data and provides various forms of full-text searching:


Relevance scoring -

  WHERE MATCH (doc, description) AGAINST ('dog cat')

OR searches -

  WHERE MATCH (doc, description) AGAINST ('dog cat' IN BOOLEAN MODE)

AND searches -

  WHERE MATCH (doc, description) AGAINST ('+dog +cat' IN BOOLEAN MODE)

Given these choices, I'm not sure what difference it makes what the default 
is.  You surely don't propose to pass unmodified user input to mysql, as 
that's not a good idea (see SQL injection 
http://www.google.com/search?q=SQL+injection).  If you want AND searches, 
simply have your app add the + signs to the user input as it builds the 
query to send to mysql.


If you are determined to change mysql's default behavior, then Sergei has 
already given a solution earlier in this thread: swap the '+' and ' ' in the 
ft_boolean_syntax variable.  The only objection raised to this was the 
suggestion that if the user prepends a '+' to a word, it becomes optional 
(OR instead of AND), but that's a moot point, as your app will, of course, 
strip the '+' when parsing the user's input.


Michael


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



Re: Please help me: Boolean fulltext searches, AND instead of OR

2005-08-22 Thread John thegimper
Is there still no solution for this? Every large searchengine works like this.

Quoting:
 
 
 Hi that works fine only now if a user puts + in front of a word that
 word 
 becomes optional = OR?
 What i would like is the search to work exactly like before only that it
 
 defaults to AND instead of OR.
 Almost every search engine i have tried, google etc. works like this.
 black horse cat dog only show results with all words present.
 
 This is what i did, set global ft_boolean_syntax = ' +-()~*:|'
 
 I really appreciate your help!!
 
 From: Sergei Golubchik [EMAIL PROTECTED]
 To: Jessica Svensson [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: Please help me: Boolean fulltext searches, AND instead of
 OR
 Date: Wed, 23 Mar 2005 22:32:49 +0100
 
 Hi!
 
 On Mar 23, Jessica Svensson wrote:
   Is there any way i can get results with AND instead of OR?
   Trying to search for black cat should only return records that 
 contains
   both black and cat.
  
   I'm using the following code to get my result:
  
   SELECT * FROM `searchtbl` WHERE MATCH (text) AGAINST ('black cat' IN
   BOOLEAN MODE);
  
   sure there must be an easy way to change the default word separator
 to 
 AND
   instead of OR?
 
 There is. See ft_boolean_syntax variable - it defines what characters
 is
 used for each operator. In particular it defines '+' for must be
 present and a space ' ' for optionally present words.
 
 You want to put the space first (for must be present words)
 
 Regards,
 Sergei
 
 --
 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
   / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
 /_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
 ___/  www.mysql.com
 
 _
 Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/
 
 


 

-
FREE E-MAIL IN 1 MINUTE!
 - [EMAIL PROTECTED] - http://www.pc.nu

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



Re: Please help me: Boolean fulltext searches, AND instead of OR

2005-08-22 Thread John thegimper
This is what i need:

Posted by gogman on Monday May 5 2003, @10:42am on the mysql website:

MySQL defaults to an 'OR'. Example: 'dog cat' = 'dog OR cat'. Most fulltext 
search engines default to an 'AND'. These include: AltaVista, Fast Search, 
Google, Hotbot, Lycos, Northern Light and Yahoo. Excite is an exception that 
defaults to an 'OR'. 


New Feature: set-variable = ft_boolean_default='AND'

vs 'OR'

('OR' would be the default setting so as to not break older code)

With a 'AND' default 'OR' would have to be explicit. Example: 'dog cat' = 'dog 
AND cat', 'dog OR cat' - requires 'OR' to be set.

Performance tests are indicating a 5-7 times increase in search speed 
with AND vs OR statements.

--


I have done some searches on google and found several people wanting to do the 
same... but no solutions.


Quoting John thegimper [EMAIL PROTECTED]:

 Is there still no solution for this? Every large searchengine works like
 this.
 
 Quoting:
  
  
  Hi that works fine only now if a user puts + in front of a word that
  word 
  becomes optional = OR?
  What i would like is the search to work exactly like before only that
 it
  
  defaults to AND instead of OR.
  Almost every search engine i have tried, google etc. works like this.
  black horse cat dog only show results with all words present.
  
  This is what i did, set global ft_boolean_syntax = ' +-()~*:|'
  
  I really appreciate your help!!
  
  From: Sergei Golubchik [EMAIL PROTECTED]
  To: Jessica Svensson [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  Subject: Re: Please help me: Boolean fulltext searches, AND instead
 of
  OR
  Date: Wed, 23 Mar 2005 22:32:49 +0100
  
  Hi!
  
  On Mar 23, Jessica Svensson wrote:
Is there any way i can get results with AND instead of OR?
Trying to search for black cat should only return records that 
  contains
both black and cat.
   
I'm using the following code to get my result:
   
SELECT * FROM `searchtbl` WHERE MATCH (text) AGAINST ('black cat'
 IN
BOOLEAN MODE);
   
sure there must be an easy way to change the default word
 separator
  to 
  AND
instead of OR?
  
  There is. See ft_boolean_syntax variable - it defines what characters
  is
  used for each operator. In particular it defines '+' for must be
  present and a space ' ' for optionally present words.
  
  You want to put the space first (for must be present words)
  
  Regards,
  Sergei
  
  --
  __  ___ ___   __
 /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
/ /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
  /_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
  ___/  www.mysql.com
  
  _
  Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/
  
  
 
 
  
 
 -
 FREE E-MAIL IN 1 MINUTE!
  - [EMAIL PROTECTED] - http://www.pc.nu
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 



 

-
FREE E-MAIL IN 1 MINUTE!
 - [EMAIL PROTECTED] - http://www.pc.nu

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



Re: Please help me: Boolean fulltext searches, AND instead of OR

2005-03-23 Thread Brent Baisley
I couldn't find much on the variable you were trying to change. 
Although it may have changed and now be called ft_boolean_syntax. But 
that still won't help you since it doesn't appear to have an option to 
change the default separator.
I think you will need to add the + to each word if you want the AND 
behavior. Why are you so averse to parsing? It would make it easier for 
the user to input search terms.

If it's helpful, below is some php code I use for parsing search 
phrases entered by users. It adds + and * based on quotes or 
independent words. I wrote it a long time ago and it problem needs to 
be looked at to make it better, but it's worked for me for a while now. 
It will give you the AND behavior you are looking for.

function prepFullTextSearch($searchVal) {
	//Split words into list
	$word_List			= explode(' ',trim($searchVal));
	//Step through word list to get search phrases
	$i	= 0;
	$isPhrase= false;
	foreach($word_List as $word) {
		$searchItems[$i]	= trim( ($isPhrase?$searchItems[$i].' '.$word:$word) 
);
		//Check for start of Phrase
		if(substr($searchItems[$i],0,1) == '') {
			$isPhrase		= true;
		}
		//If not building a phrase, append wildcard (*) to end of word
		if(!$isPhrase) {
			$searchItems[$i]	.= '*';
			$i++;
		}
		//Check for end of Phrase
		if(substr($searchItems[$i],-1) == '') {
			$isPhrase		= false;
			$i++;
		}
	}
	$searchVal= '+'.implode(' +',$searchItems);
	return $searchVal;
}

On Mar 23, 2005, at 2:45 PM, Jessica Svensson wrote:
Is there any way i can get results with AND instead of OR?
Trying to search for black cat should only return records that 
contains both black and cat.

I'm using the following code to get my result:
SELECT * FROM `searchtbl` WHERE MATCH (text) AGAINST ('black cat' IN 
BOOLEAN MODE);

sure there must be an easy way to change the default word separator to 
AND instead of OR?

I found this:
set-variable = ft_boolean_default='AND'
SET ft_boolean_default = 'AND'
But it does not work, everything would be sooo much easier if this was 
possible.

black cat is only an example and the real query comes from user 
input. So it can be anything like +cat -dog +big nose -horse white 
black -red
so parsing the input is not what i want, i just want to change the 
default word separator to AND instead of OR.

Now i´m running 4.1.10 and also tried with 4.0.24
Please help me, there must be a way to change this?!?!
_
Hitta rätt på nätet med MSN Sök http://search.msn.se/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Please help me: Boolean fulltext searches, AND instead of OR

2005-03-23 Thread Sergei Golubchik
Hi!

On Mar 23, Jessica Svensson wrote:
 Is there any way i can get results with AND instead of OR?
 Trying to search for black cat should only return records that contains 
 both black and cat.
 
 I'm using the following code to get my result:
 
 SELECT * FROM `searchtbl` WHERE MATCH (text) AGAINST ('black cat' IN 
 BOOLEAN MODE);
 
 sure there must be an easy way to change the default word separator to AND 
 instead of OR?

There is. See ft_boolean_syntax variable - it defines what characters is
used for each operator. In particular it defines '+' for must be
present and a space ' ' for optionally present words.

You want to put the space first (for must be present words)
 
Regards,
Sergei

-- 
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   ___/  www.mysql.com

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



Re: Please help me: Boolean fulltext searches, AND instead of OR

2005-03-23 Thread Jessica Svensson
Hi that works fine only now if a user puts + in front of a word that word 
becomes optional = OR?
What i would like is the search to work exactly like before only that it 
defaults to AND instead of OR.
Almost every search engine i have tried, google etc. works like this.
black horse cat dog only show results with all words present.

This is what i did, set global ft_boolean_syntax = ' +-()~*:|'
I really appreciate your help!!
From: Sergei Golubchik [EMAIL PROTECTED]
To: Jessica Svensson [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: Please help me: Boolean fulltext searches, AND instead of OR
Date: Wed, 23 Mar 2005 22:32:49 +0100
Hi!
On Mar 23, Jessica Svensson wrote:
 Is there any way i can get results with AND instead of OR?
 Trying to search for black cat should only return records that 
contains
 both black and cat.

 I'm using the following code to get my result:

 SELECT * FROM `searchtbl` WHERE MATCH (text) AGAINST ('black cat' IN
 BOOLEAN MODE);

 sure there must be an easy way to change the default word separator to 
AND
 instead of OR?

There is. See ft_boolean_syntax variable - it defines what characters is
used for each operator. In particular it defines '+' for must be
present and a space ' ' for optionally present words.
You want to put the space first (for must be present words)
Regards,
Sergei
--
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   ___/  www.mysql.com
_
Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Please help me: Boolean fulltext searches, AND instead of OR

2005-03-23 Thread leegold

On Wed, 23 Mar 2005 22:22:34 +, Jessica Svensson
[EMAIL PROTECTED] said:
 Hi that works fine only now if a user puts + in front of a word that word 
 becomes optional = OR?
 What i would like is the search to work exactly like before only that it 
 defaults to AND instead of OR.
 Almost every search engine i have tried, google etc. works like this.
 black horse cat dog only show results with all words present.

I'm a little late in the discussion but...
Are you using a scripting language with MYSQL? It'd be easy w/PHP


 
 This is what i did, set global ft_boolean_syntax = ' +-()~*:|'
 
 I really appreciate your help!!
 
 From: Sergei Golubchik [EMAIL PROTECTED]
 To: Jessica Svensson [EMAIL PROTECTED]
 CC: mysql@lists.mysql.com
 Subject: Re: Please help me: Boolean fulltext searches, AND instead of OR
 Date: Wed, 23 Mar 2005 22:32:49 +0100
 
 Hi!
 
 On Mar 23, Jessica Svensson wrote:
   Is there any way i can get results with AND instead of OR?
   Trying to search for black cat should only return records that 
 contains
   both black and cat.
  
   I'm using the following code to get my result:
  
   SELECT * FROM `searchtbl` WHERE MATCH (text) AGAINST ('black cat' IN
   BOOLEAN MODE);
  
   sure there must be an easy way to change the default word separator to 
 AND
   instead of OR?
 
 There is. See ft_boolean_syntax variable - it defines what characters is
 used for each operator. In particular it defines '+' for must be
 present and a space ' ' for optionally present words.
 
 You want to put the space first (for must be present words)
 
 Regards,
 Sergei
 
 --
 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
   / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
 /_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
 ___/  www.mysql.com
 
 _
 Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/
 
 
 -- 
 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: Please help me optimize a MySQL server.

2004-05-19 Thread Egor Egorov
Mohammed Sameer [EMAIL PROTECTED] wrote:
 I'm running a MySQL server on a duel P III 1G, with 2 GB RAM.
 MySQL 4.0.18 compiled from source.

 We have 2 webservers running apache, And this is the backend database server.
 The server is really slow.
 a select on a table with 138,247 rows takes about 1.6 - 2+ seconds, I have about 50% 
 CPU
 idle.

 using MyISAM table types.

 sure I can provide any statistics about the running server.
 Do you think that switching to innodb'd help ? Is it a problem with Debian woody ??
 Any suggestions are welcomed.

Does MySQL use indexes? You can check it with EXPLAIN SELECT:
http://dev.mysql.com/doc/mysql/en/EXPLAIN.html

Some optimization tips you can find at:
http://dev.mysql.com/doc/mysql/en/MySQL_Optimisation.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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



[uniball@gmx.net: Re: Please help me optimize a MySQL server.]

2004-05-19 Thread Mohammed Sameer
sorry Egor Egorov, Mutt sent the mail to your private inbox ;)
resending to the mailing list.

On Wed, May 19, 2004 at 02:02:29PM +0300, Egor Egorov wrote:
 Mohammed Sameer [EMAIL PROTECTED] wrote:
  I'm running a MySQL server on a duel P III 1G, with 2 GB RAM.
  MySQL 4.0.18 compiled from source.
 
  We have 2 webservers running apache, And this is the backend database server.
  The server is really slow.
  a select on a table with 138,247 rows takes about 1.6 - 2+ seconds, I have about 
  50% CPU
  idle.
 
  using MyISAM table types.
 
  sure I can provide any statistics about the running server.
  Do you think that switching to innodb'd help ? Is it a problem with Debian woody ??
  Any suggestions are welcomed.
Thanks for replying...

 
 Does MySQL use indexes? You can check it with EXPLAIN SELECT:
   http://dev.mysql.com/doc/mysql/en/EXPLAIN.html
 
It's phpBB and phpnuke still fighting with them to trash phpnuke default tables.
The website is really active, with about 67000 visits/day.
We are using a RAID controller for the server.

 Some optimization tips you can find at:
   http://dev.mysql.com/doc/mysql/en/MySQL_Optimisation.html

I tried all this, but no use.
CPU idle is usually 0%
a 1.5 gig log file was generated in about 12h or so.
move to innodb from MyISAM ? Is it a Debian woody problem ? load balancing ?

I tried to do what I can, but nothing improved the performance.

-- 

-- Katoob Main Developer
Linux registered user #224950, ICQ #58475622
--
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.fsf.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature
--
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT d-(++)@ s+(++):-+++ a-- C+++$ UL+++$ P+++$+
L+++()$+ E+++ W++?$ N o? K-? !w++ !O !M !V !PS@ !PE@ Y+ PGP=+++
t? 5? !X R? tv-- b+@ DI D+ G-- e+ h--++ !r y?
--END GEEK CODE BLOCK--


signature.asc
Description: Digital signature


Re: Please help me optimize a MySQL server.

2004-05-19 Thread Brent Baisley
Something that small shouldn't really need optimizing. What is the size 
of your data (mb?, gb?) and what does your query look like? If you are 
doing a wild card search on a large text field without a full text 
index, then those times may be the best you're going to get. Many times 
it's about optimizing your query statement or you indexes rather than 
MySQL settings.
For instance, I have a test machine (Mac G4 400Mhz, 512MB, MySQL 
4.0.18) that does a three table join with each table having just over 
100,000 rows. My initial query took about 12 seconds, but changing my 
query statement around a little I got it to just under 1 second. Which 
is pretty good considering the hardware it's on.
What does you explain for the query look like? It's probably doing a 
full table scan, which means you're bottleneck is the disk.

On May 19, 2004, at 3:26 AM, Mohammed Sameer wrote:
Hi,
I'm running a MySQL server on a duel P III 1G, with 2 GB RAM.
MySQL 4.0.18 compiled from source.
We have 2 webservers running apache, And this is the backend database 
server.
The server is really slow.
a select on a table with 138,247 rows takes about 1.6 - 2+ seconds, I 
have about 50% CPU idle.

using MyISAM table types.
sure I can provide any statistics about the running server.
Do you think that switching to innodb'd help ? Is it a problem with 
Debian woody ??
Any suggestions are welcomed.

Many thanks!
--

-- Katoob Main Developer
Linux registered user #224950, ICQ #58475622
--
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.fsf.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature
--
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT d-(++)@ s+(++):-+++ a-- C+++$ UL+++$ P+++$+
L+++()$+ E+++ W++?$ N o? K-? !w++ !O !M !V !PS@ !PE@ 
Y+ PGP=+++
t? 5? !X R? tv-- b+@ DI D+ G-- e+ h--++ !r y?
--END GEEK CODE BLOCK--

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Please help me optimize a MySQL server.

2004-05-19 Thread Mohammed Sameer
On Wed, May 19, 2004 at 08:47:28AM -0400, Brent Baisley wrote:
 Something that small shouldn't really need optimizing. What is the size 
 of your data (mb?, gb?) and what does your query look like? If you are 
 doing a wild card search on a large text field without a full text 
 index, then those times may be the best you're going to get. Many times 
 it's about optimizing your query statement or you indexes rather than 
 MySQL settings.
mainly we are using 2 databases:
675M for phpbb and 77M for phpnuke. That's not much.
Ok, It seems that the actual queries performed by phpbb are optimized.

 For instance, I have a test machine (Mac G4 400Mhz, 512MB, MySQL 
 4.0.18) that does a three table join with each table having just over 
 100,000 rows. My initial query took about 12 seconds, but changing my 
 query statement around a little I got it to just under 1 second. Which 
 is pretty good considering the hardware it's on.
 What does you explain for the query look like? It's probably doing a 
 full table scan, which means you're bottleneck is the disk.
 

but the server is running on a duel P III with 2 GB RAM and a RAID controller.
Do you think there is much to be done, or shall I look for better hardware/or 
clustering ?

 On May 19, 2004, at 3:26 AM, Mohammed Sameer wrote:
 
 Hi,
 I'm running a MySQL server on a duel P III 1G, with 2 GB RAM.
 MySQL 4.0.18 compiled from source.
 
 We have 2 webservers running apache, And this is the backend database 
 server.
 The server is really slow.
 a select on a table with 138,247 rows takes about 1.6 - 2+ seconds, I 
 have about 50% CPU idle.
 
 using MyISAM table types.
 
 sure I can provide any statistics about the running server.
 Do you think that switching to innodb'd help ? Is it a problem with 
 Debian woody ??
 Any suggestions are welcomed.
 
 Many thanks!
 
 -- 
 
 -- Katoob Main Developer
 Linux registered user #224950, ICQ #58475622
 --
 Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
 Read http://www.fsf.org/philosophy/no-word-attachments.html
 Preferable attachments: .PDF, .HTML, .TXT
 Thanx for adding this text to Your signature
 --
 -BEGIN GEEK CODE BLOCK-
 Version: 3.1
 GCM/IT d-(++)@ s+(++):-+++ a-- C+++$ UL+++$ P+++$+
 L+++()$+ E+++ W++?$ N o? K-? !w++ !O !M !V !PS@ !PE@ 
 Y+ PGP=+++
 t? 5? !X R? tv-- b+@ DI D+ G-- e+ h--++ !r y?
 --END GEEK CODE BLOCK--
 
 -- 
 Brent Baisley
 Systems Architect
 Landover Associates, Inc.
 Search  Advisory Services for Advanced Technology Environments
 p: 212.759.6400/800.759.0577
 

-- 

-- Katoob Main Developer
Linux registered user #224950, ICQ #58475622
--
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.fsf.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature
--
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT d-(++)@ s+(++):-+++ a-- C+++$ UL+++$ P+++$+
L+++()$+ E+++ W++?$ N o? K-? !w++ !O !M !V !PS@ !PE@ Y+ PGP=+++
t? 5? !X R? tv-- b+@ DI D+ G-- e+ h--++ !r y?
--END GEEK CODE BLOCK--


signature.asc
Description: Digital signature


Re: Please help me optimize a MySQL server.

2004-05-19 Thread Brent Baisley
I wouldn't upgrade until you know where the bottleneck is (CPU, disk, 
network, or RAM). Since you are using professional software, I 
wouldn't try to change the queries. Have you made changes to your 
my.cnf file? Since you have enough ram to hold all the data, ram is 
probably not your bottleneck. The question is whether you have your 
system configured to use it.
I forget if phpbb and phpnuke use PEAR::DB to access the underlying 
database. If they do, there is a certain amount of overhead involved 
that you just can't get around without changing the database access 
code to use native calls. Are your database and web server on the 
same machine (a security no-no, but performance yes-yes)? If they are 
on separate machines, make sure you have a fast connection between 
them, at least 100MB and make sure it's full duplex.

On May 19, 2004, at 10:34 AM, Mohammed Sameer wrote:
On Wed, May 19, 2004 at 08:47:28AM -0400, Brent Baisley wrote:
Something that small shouldn't really need optimizing. What is the 
size
of your data (mb?, gb?) and what does your query look like? If you are
doing a wild card search on a large text field without a full text
index, then those times may be the best you're going to get. Many 
times
it's about optimizing your query statement or you indexes rather than
MySQL settings.
mainly we are using 2 databases:
675M for phpbb and 77M for phpnuke. That's not much.
Ok, It seems that the actual queries performed by phpbb are optimized.
For instance, I have a test machine (Mac G4 400Mhz, 512MB, MySQL
4.0.18) that does a three table join with each table having just over
100,000 rows. My initial query took about 12 seconds, but changing my
query statement around a little I got it to just under 1 second. Which
is pretty good considering the hardware it's on.
What does you explain for the query look like? It's probably doing a
full table scan, which means you're bottleneck is the disk.
but the server is running on a duel P III with 2 GB RAM and a RAID 
controller.
Do you think there is much to be done, or shall I look for better 
hardware/or clustering ?

On May 19, 2004, at 3:26 AM, Mohammed Sameer wrote:
Hi,
I'm running a MySQL server on a duel P III 1G, with 2 GB RAM.
MySQL 4.0.18 compiled from source.
We have 2 webservers running apache, And this is the backend database
server.
The server is really slow.
a select on a table with 138,247 rows takes about 1.6 - 2+ seconds, I
have about 50% CPU idle.
using MyISAM table types.
sure I can provide any statistics about the running server.
Do you think that switching to innodb'd help ? Is it a problem with
Debian woody ??
Any suggestions are welcomed.
Many thanks!
--

-- Katoob Main Developer
Linux registered user #224950, ICQ #58475622
--
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.fsf.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature
--
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT d-(++)@ s+(++):-+++ a-- C+++$ UL+++$ P+++$+
L+++()$+ E+++ W++?$ N o? K-? !w++ !O !M !V !PS@ !PE@
Y+ PGP=+++
t? 5? !X R? tv-- b+@ DI D+ G-- e+ h--++ !r y?
--END GEEK CODE BLOCK--
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--

-- Katoob Main Developer
Linux registered user #224950, ICQ #58475622
--
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.fsf.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature
--
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT d-(++)@ s+(++):-+++ a-- C+++$ UL+++$ P+++$+
L+++()$+ E+++ W++?$ N o? K-? !w++ !O !M !V !PS@ !PE@ 
Y+ PGP=+++
t? 5? !X R? tv-- b+@ DI D+ G-- e+ h--++ !r y?
--END GEEK CODE BLOCK--

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Please help me optimize a MySQL server.

2004-05-19 Thread Mohammed Sameer
On Wed, May 19, 2004 at 11:36:38AM -0400, Brent Baisley wrote:
 I wouldn't upgrade until you know where the bottleneck is (CPU, disk, 
 network, or RAM). Since you are using professional software, I 
 wouldn't try to change the queries. Have you made changes to your 
 my.cnf file? Since you have enough ram to hold all the data, ram is 
 probably not your bottleneck. The question is whether you have your 
 system configured to use it.

Here is the uncommented parts in the /etc/my.cnf:
[client]
port= 3306
socket  = /tmp/mysql.sock

[mysqld]
port= 3306
socket  = /tmp/mysql.sock
key_buffer = 384M
skip-locking
set-variable= max_connections=3500
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M
thread_concurrency = 2
server-id   = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

 I forget if phpbb and phpnuke use PEAR::DB to access the underlying 
 database. If they do, there is a certain amount of overhead involved 
 that you just can't get around without changing the database access 
 code to use native calls. Are your database and web server on the 
 same machine (a security no-no, but performance yes-yes)? If they are 
 on separate machines, make sure you have a fast connection between 
 them, at least 100MB and make sure it's full duplex.
 
I think they don't use it, The database on a separate server, with a 1000MB LAN 
connection, Same for the 2 webservers.
I verified this now.

 
 On May 19, 2004, at 10:34 AM, Mohammed Sameer wrote:
 
 On Wed, May 19, 2004 at 08:47:28AM -0400, Brent Baisley wrote:
 Something that small shouldn't really need optimizing. What is the 
 size
 of your data (mb?, gb?) and what does your query look like? If you are
 doing a wild card search on a large text field without a full text
 index, then those times may be the best you're going to get. Many 
 times
 it's about optimizing your query statement or you indexes rather than
 MySQL settings.
 mainly we are using 2 databases:
 675M for phpbb and 77M for phpnuke. That's not much.
 Ok, It seems that the actual queries performed by phpbb are optimized.
 
 For instance, I have a test machine (Mac G4 400Mhz, 512MB, MySQL
 4.0.18) that does a three table join with each table having just over
 100,000 rows. My initial query took about 12 seconds, but changing my
 query statement around a little I got it to just under 1 second. Which
 is pretty good considering the hardware it's on.
 What does you explain for the query look like? It's probably doing a
 full table scan, which means you're bottleneck is the disk.
 
 
 but the server is running on a duel P III with 2 GB RAM and a RAID 
 controller.
 Do you think there is much to be done, or shall I look for better 
 hardware/or clustering ?
 
 On May 19, 2004, at 3:26 AM, Mohammed Sameer wrote:
 
 Hi,
 I'm running a MySQL server on a duel P III 1G, with 2 GB RAM.
 MySQL 4.0.18 compiled from source.
 
 We have 2 webservers running apache, And this is the backend database
 server.
 The server is really slow.
 a select on a table with 138,247 rows takes about 1.6 - 2+ seconds, I
 have about 50% CPU idle.
 
 using MyISAM table types.
 
 sure I can provide any statistics about the running server.
 Do you think that switching to innodb'd help ? Is it a problem with
 Debian woody ??
 Any suggestions are welcomed.
 
 Many thanks!
 
 -- 
 
 -- Katoob Main Developer
 Linux registered user #224950, ICQ #58475622
 --
 Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
 Read http://www.fsf.org/philosophy/no-word-attachments.html
 Preferable attachments: .PDF, .HTML, .TXT
 Thanx for adding this text to Your signature
 --
 -BEGIN GEEK CODE BLOCK-
 Version: 3.1
 GCM/IT d-(++)@ s+(++):-+++ a-- C+++$ UL+++$ P+++$+
 L+++()$+ E+++ W++?$ N o? K-? !w++ !O !M !V !PS@ !PE@
 Y+ PGP=+++
 t? 5? !X R? tv-- b+@ DI D+ G-- e+ h--++ !r y?
 --END GEEK CODE BLOCK--
 
 -- 
 Brent Baisley
 Systems Architect
 Landover Associates, Inc.
 Search  Advisory Services for Advanced Technology Environments
 p: 212.759.6400/800.759.0577
 
 
 -- 
 
 -- Katoob Main Developer
 Linux registered user #224950, ICQ #58475622
 --
 Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
 Read http://www.fsf.org/philosophy/no-word-attachments.html
 Preferable attachments: .PDF, .HTML, .TXT
 Thanx for adding this text to Your signature
 --
 -BEGIN GEEK CODE BLOCK-
 Version: 3.1
 GCM/IT d-(++)@ s+(++):-+++ a-- C+++$ UL+++$ P+++$+
 L+++()$+ E+++ W++?$ N o? K-? !w++ !O !M !V !PS@ !PE@ 
 Y+ PGP=+++
 t? 5? !X R? tv-- b+@ DI D+ G-- e+ h--++ !r y?
 --END GEEK 

Re: Please help me optimize a MySQL server.

2004-05-19 Thread Scott Haneda
on 05/19/2004 08:36 AM, Brent Baisley at [EMAIL PROTECTED] wrote:

 I wouldn't upgrade until you know where the bottleneck is (CPU, disk,
 network, or RAM). Since you are using professional software, I
 wouldn't try to change the queries. Have you made changes to your
 my.cnf file? Since you have enough ram to hold all the data, ram is
 probably not your bottleneck. The question is whether you have your
 system configured to use it.
 I forget if phpbb and phpnuke use PEAR::DB to access the underlying
 database. If they do, there is a certain amount of overhead involved
 that you just can't get around without changing the database access
 code to use native calls. Are your database and web server on the
 same machine (a security no-no, but performance yes-yes)? If they are
 on separate machines, make sure you have a fast connection between
 them, at least 100MB and make sure it's full duplex.

PhpBB is just php access to mysql, no PEAR::DB involved. I can say from
eperience, the phpBB code is kinda bad in regards to how it talks to mysql,
on some pages it is not at all uncommon for there to be 10 or more complex
querries.

I would be willing to bet there are many installed mods on phpBB, they
offer stuff like, show all online users which though a nice feature, is
heavy on the DB.  There are hundreds of these mods, people just copy and
paste and install them, before they know it the database is taking 30
selects on every single page load, just so you can say happy birthday to:
someuser on every page.
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]Novato, CA U.S.A.



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



RE: Please help me!

2003-06-13 Thread Mike Hillyer
As this is really a PHP specific question, you may get a better response on the PHP 
general mailing list at http://www.php.net/mailing-lists.php

Anyway, if my limited experience in PHP serves correctly, you may need to call 
echo(mysql_error()); near the potentially troublesome code. 


Regards,
Mike Hillyer
www.vbmysql.com


-Original Message-
From: Varghonan [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 13, 2003 10:36 AM
To: [EMAIL PROTECTED]
Subject: Please help me!



Hi!
 

I am new here and wonder if anyone could help me with a problem in my community.
The adress is http://trashankarna.net/community/default.php

I can't figure this out. I get this message when I choose to read a message in my 
outbox/utkorg:

Warning: 1 is not a valid MySQL-Link resource in 
C:\apache\htdocs\community\meddelanden\lasaut.php on line 69

I can read the message, anyway.

My lasaut.php looks like this:

?php @session_start();
  @$user = $iwcuser; 
  @$pass = $iwcpass;

  if(!$user) {

 echo(script language=JavaScript); 
 
echo(self.location.replace('http://trashankarna.net/community/login/ouch.php')); 
 echo(/script); 

  }

  $open = mysql_connect(localhost, community, tarot);

  $info = mysql_db_query(iwcusers, SELECT * FROM users WHERE username = 
'$user', $open);

  $rad = mysql_fetch_array($info);

 if($user == $rad[username]  $pass == $rad[password]) { ?

   ?php // top.inc ?
   ?php require ('c:\\apache\htdocs\community\_inc\top.inc'); ?

   ?php // Innehåll ?

   table cellpadding=0 cellspacing=0 style=border-width: 1pt; border-color: 
#00; border-style: solid align=left

   tr
   td class=menux width=20/td
   td class=menuxbrspan class=rubrikLäs e-postmeddelande/spanbrimg 
src=/community/_media/line.gif vspace=5 height=1 width=100%/td
   td class=menux width=10/td
   /tr

   tr
   td class=menux width=10/td
   td class=menux width=600 height=200 valign=topspan class=brodtext
   a href=/community/meddelanden/skriv.php class=bodylankSkriv ett 
e-postmeddelande/a |
   a href=/community/meddelanden/adressbok.php class=bodylankMin adressbok/a |
   a href=/community/meddelanden/mappar.php class=bodylankSkapa mapp/a |

   p

   ?php $open = mysql_connect(localhost, community, tarot);
 $db = mysql_db_query(iwepost, SELECT * FROM meddelanden WHERE id = '$id');
 $rad = mysql_fetch_array ($db);

 print $rad[subject];
 print  | ;
 print $rad[datum];
 print brbr;
 print pre class=body;
 print $rad[body];
 print /pre;

 print Tillbaka till a href=/community/meddelanden/default.php 
class=bodylankinkorgen/a;
  
 mysql_close($open);



   ?



   p

   ?php // bottom.inc ?
   ?php require ('c:\\apache\htdocs\community\_inc\bottom.inc'); ?

   ?php mysql_close($open); ?
   ?php } ?

My lasa.php looks like this:

?php @session_start();
  @$user = $iwcuser; 
  @$pass = $iwcpass;

  if(!$user) {

 echo(script language=JavaScript); 
 
echo(self.location.replace('http://trashankarna.net/community/login/ouch.php')); 
 echo(/script); 

  }

  $open = mysql_connect(localhost, community, tarot);

  $info = mysql_db_query(iwcusers, SELECT * FROM users WHERE username = 
'$user', $open);

  $rad = mysql_fetch_array($info);

 if($user == $rad[username]  $pass == $rad[password]) { ?

   ?php // top.inc ?
   ?php require ('c:\\apache\htdocs\community\_inc\top.inc'); ?

   ?php // Innehåll ?

   table cellpadding=0 cellspacing=0 style=border-width: 1pt; border-color: 
#00; border-style: solid align=left

   tr
   td class=menux width=20/td
   td class=menuxbrspan class=rubrikLäs e-postmeddelande/spanbrimg 
src=/community/_media/line.gif vspace=5 height=1 width=100%/td
   td class=menux width=10/td
   /tr

   tr
   td class=menux width=10/td
   td class=menux width=600 height=200 valign=topspan class=brodtext
   a href=/community/meddelanden/skriv.php class=bodylankSkriv ett 
e-postmeddelande/a |
   a href=/community/meddelanden/adressbok.php class=bodylankMin adressbok/a |
   a href=/community/meddelanden/mappar.php class=bodylankSkapa mapp/a |

   p

   ?php $open = mysql_connect(localhost, community, tarot);
 $db = mysql_db_query(iwepost, SELECT * FROM meddelanden WHERE id = '$id');
 $rad = mysql_fetch_array ($db);

 print $rad[subject];
 print  | ;
 print $rad[datum];
 print brbr;
 print pre class=body;
 print $rad[body];
 print /pre;

 print Tillbaka till a href=/community/meddelanden/default.php 
class=bodylankinkorgen/a;
  
 mysql_close($open);

 $open = mysql_connect(localhost, community, tarot);
 mysql_db_query(iwepost, UPDATE meddelanden SET last = 'j' WHERE id = 
'$id');



  

   ?



   p

   ?php // bottom.inc ?
   ?php require ('c:\\apache\htdocs\community\_inc\bottom.inc'); ?

   ?php mysql_close($open); 

re: please help me

2003-03-28 Thread Egor Egorov
On Friday 28 March 2003 13:59, Ing.Peter Misovic wrote:

 i have deleted mysql database,
 can i restore it with start defaults ?

mysql_install_db is your solution. :) 

 Thailon, Slovakia




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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



Re: please help me - problem with innodb foreign keys

2003-01-14 Thread Heikki Tuuri
Natale,

please address these general questions to [EMAIL PROTECTED]

InnoDB requires that the indexes are created explicitly. It would require a
change to MySQL to automate the creation of them.

Without indexes foreign key checks would be very slow because then every
check would have to do a table scan.

Regards,

Heikki
Innobase Oy
sql query

- Original Message -
From: Natale Babbo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 5:52 PM
Subject: please help me - problem with innodb foreign keys


 # - PLEASE HELP -- #

 hi,

 i've a problem with innodb foreign keys creation as
 following:

 is it still true that mysql/innodb needs explicit
 index creation on foreign keys?
 why can't i use a standard syntax for foreign keys
 creations?
 i have a database schema (ddl) with over 50 tables and
 i was trying to create the database on mysql when i
 receive a lot of errors like this:

 ERROR 1005: Can't create table  (errno 150)

 how can i create the database without creating
 explicitly an index on each foreign keys of my
 database?

 any suggestions are appreciated.
 Please help me. Many thanks.

 __
 Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino

http://it.yahoo.com/mail_it/foot/?http://it.mobile.yahoo.com/index2002.html


-
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: please help me understand users privileges

2002-05-30 Thread miguel solorzano

At 23:49 29/5/2002 -0400, Charles Brown wrote:
Hi,

I removed the user= and password= entries from the my.ini
file, because I didn't like seeing a password exposed in plain text.
This seemed to have no effect on MySQL at all.  What are those
entries for? Do I need them?  What should they be?  The MySQL
account name and password?

No you don't need them if you don't want that the tool queries the
server for to see the variables, databases/tables and make reports,
in another words them are used for to connect to the server, not for
start/stop the server.
However you need to consider that the my.ini file is locates at WinDir
directory (WINNT\Windows) and for security you need to protect that
directory with the Windows directives, in this case the my.ini file
even in plain text should be protected.

Regards,
Miguel 


-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Miguel A. Solórzano [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Mogi das Cruzes - São Paulo, Brazil
   ___/   www.mysql.com


-
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: Please Help Me

2002-04-26 Thread Nick Stuart

Whats your INSERT statement look like? And does it give any errors back?
-Nick

 I am

using MySql with Visual Basic.

 I Got an ERROR when trying to add a new record in

situation as under.

 I have a table Company
 and a field in that table EmpName char

(20)
 and one record is there value is = Piyush
 I am trying to add a new record  I can add
if
the value of field is
 less then or equal to the length of old record len(Piyush) =
6.(Max

 Length of value from old records)

 If i will try to add Ashok i can add it
BUT
 If I
TRY TO ADD SANDEEP the length is 7 I could not add it.
 getting an error.


 and if there
is not any record means maximum value from old record is
 zero then i could
not add a record
means clearly i could not add  FIRST
 RECORD ANYWAY FORM VISUAL BASIC.




 what is
solution

 Please help ME. Thanks in Advance

 - Piyush




 -
 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 mysql-
[EMAIL PROTECTED] To
 unsubscribe, e-mail
 mysql-
unsubscribe-
[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: please help me

2001-11-30 Thread Norman Khine

Hi try http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html
for good tutorials on PHP and MySQL, although biased toward Unix, I suppose
it should work in a similar way on IIS. Maybe wrong?!

snip
?

$dbuser = 'root';

$dbhost = 'localhost';

$dbpass = 'password';

$dbname = 'test2';

$dbtble = 'books';

$mysql_link = mysql_connect($dbhost,$dbuser,$dbpass);

$column = mysql_list_fields($dbname,$dbtble,$mysql_link);

for($i=0; $i mysql_num_fields($column); $i++ )
{
print mysql_field_name($column,$i ).br;
}

?


-Original Message-
From: anandakkumar araskumar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 12:37 PM
To: [EMAIL PROTECTED]
Subject: please help me


Hi all
Iam new to php and iam learning that from scratch.I
came across a problem in connecting mysql from php
script.I run php in windows2000 under IIS configured
to personal web server.I have installed mysql
with server and client and both are running in the
same machine(ofcourse, i can you use the ipaddress of
localhost).I didn't set any username or password with
mysql.

This is my php script:
$link=mysql_connect(localhost);
if($link)
die(Couldn't connect to mysql.mysql_error() );
print Successfully connected to server;

when i execute this program iam getting the following
message:
Couldn't connect to mysql

Anyone please help me as this is very urgent.

thanks in advance

Regards
shahjahan








__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-
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: please help me

2001-11-29 Thread Johnny Withers

Although this is not a php list...

mysql_connect() returns TRUE on success and FALSE on
failuer, so testing $link like if($link) means it
did connect.

your script should read:
$link=mysql_connect(localhost)

// the !(bang as it is called) means NOT
// so !TRUE == FALSE

if(!$link) {
printf(Could not connect to mysql server: %s,mysql_error());
} else {
//connection is good
}

or, better yet:

if(!$link=mysql_connect(localhost)) {
printf(Could not connect:\n%s :
%s\n,mysql_errno(),mysql_error());
} else {
//connection is good
}


hope it helps.

-
Johnny Withers
[EMAIL PROTECTED]
p. 601.853.0211
c. 601.209.4985 

-Original Message-
From: anandakkumar araskumar [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 29, 2001 6:37 AM
To: [EMAIL PROTECTED]
Subject: please help me


Hi all 
Iam new to php and iam learning that from scratch.I
came across a problem in connecting mysql from php
script.I run php in windows2000 under IIS configured
to personal web server.I have installed mysql 
with server and client and both are running in the
same machine(ofcourse, i can you use the ipaddress of
localhost).I didn't set any username or password with
mysql. 

This is my php script: 
$link=mysql_connect(localhost); 
if($link) 
die(Couldn't connect to mysql.mysql_error() ); 
print Successfully connected to server; 

when i execute this program iam getting the following
message: 
Couldn't connect to mysql 

Anyone please help me as this is very urgent. 

thanks in advance 

Regards 
shahjahan 
 

 
 




__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-
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: please help me

2001-11-29 Thread Neil Zanella


On Thu, 29 Nov 2001, anandakkumar araskumar wrote:

 Hi all
 Iam new to php and iam learning that from scratch.I
 came across a problem in connecting mysql from php
 script.I run php in windows2000 under IIS configured
 to personal web server.I have installed mysql
 with server and client and both are running in the
 same machine(ofcourse, i can you use the ipaddress of
 localhost).I didn't set any username or password with
 mysql.

 This is my php script:
 $link=mysql_connect(localhost);
 if($link)
 die(Couldn't connect to mysql.mysql_error() );

Perhaps you meant if(!$link) ...
Notice the not ! operand. If a link is established then the $link PHP
variable will no longer hold the empty string. In PHP all varaibles
are automatically initialized to hold an empty string which can also
be used interchangeably with the boolean false value.

The standard way of connecting is:

   $link = mysql_connect($db_host, $db_user, $db_pass)
  OR die(Could not connect to database server.);

Here the stuff after OR is executed only if mysql_connect returns false
which is the way the C || operator works.

Regards,

Neil


-
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: please help me .........cannot find -lmysqlcliente

2001-09-24 Thread Trond Eivind Glomsrød

katty Iniguez [EMAIL PROTECTED] writes:

 I use Linux RedHat 7.0
 
 I installed and Configured MySQL-3.23.42
 
 I am installing icradius-0.18.1
 
 installing icradius I got the following:
 
 make: /usr/bin/ld: cannot find -lmysqlclient
 collect2: ld returned 1 exit status
 make: *** [radius] Error 1

1) Make sure you have mysql-devel installed
2) Make sure you have -L/where/your/mysqlclientlibrary/is on your
   linker line 

 Now, i added the line: /proc/6/fd/mysqlclient - - - (that is where I
 found lmysqlclient)

That's something different - /proc/* aren't real files.

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

-
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: please help me .........cannot find -lmysqlcliente

2001-09-24 Thread Rodney Broom

From: katty Iniguez [EMAIL PROTECTED]

 make: /usr/bin/ld: cannot find -lmysqlclient
 collect2: ld returned 1 exit status
 make: *** [radius] Error 1
 
 Now, i added the line: /proc/6/fd/mysqlclient - - - (that is where I found 
 lmysqlclient)

This location probably isn't what you want. You probably want something inside of your 
mysql instalation directory.


---
Rodney Broom
Programmer: Desert.Net




-
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: Please help me , about mysql replicate!

2001-09-03 Thread Jeremy Zawodny

On Fri, Aug 31, 2001 at 05:44:11PM +0800, Wang Aocheng wrote:
 Dear All, 
 
 I have a question:
 
 How can build multi-master-host?
 
 I have 3 mysql hosts,I want to use mysql data replicate. thanks!

And you want all 3 to be masters?

If so, you need to configure them in a replication triangle where
the master/slave relationship looks like this, where X --Y means Y
is a slave of X

  A -- B -- C -- A

Or, easier to visualize in my poor ASCII art:

A
   / ^
  /   \
 v \
B  C

That should do what you're looking for.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 3 days, processed 33,382,375 queries (110/sec. avg)

-
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: PLEASE help me!! MySQL Linux Problem

2001-07-18 Thread Mike Baranski

Read the man page for gcc and note the command line switch to point the 
linker at specific libraries, then use those switches on the command line.  
This is a linker error, rather than a compiler error:

Example:
g++ myGreatProgram.cpp -L/usr/mysql/lib -lmysqlclient



On Wednesday 18 July 2001 15:28, David Ayliffe wrote:
 I am having A LOT of trouble compiling the code Simple1.cc which comes
 with the C++ API for Linux
 I have extracted the API to a directory in /root/ and MySQL is installed
 and works in /usr/local/mysql

 PLEASE someone please help me compile just this simple program.  What am
 I missing?

 When I compile it I include the path to the header files to mysql and of
 the mysql API.

 I am running Suse Linux 7.1 professional with Kernel 2.4
 This is what I get when I try and compile it:


 pc-xxx-31-190-xxx-du:~/mysql++-1.7.9/examples # g++ simple1.cc
 -I/root/mysql++-1.7.9/sqlplusint/ -I/usr/local/mysql/include
 /tmp/ccvKKWW7.o: In function `main':
 /tmp/ccvKKWW7.o(.text+0x30): undefined reference to
 `MysqlConnection::MysqlConnection(char const *, char const *, char const
 *, char const *, bool)'
 /tmp/ccvKKWW7.o(.text+0x55b): undefined reference to `operator(ostream
 , mysql_ColDataconst_string const )'
 /tmp/ccvKKWW7.o(.text+0x6a2): undefined reference to
 `MysqlConnection::~MysqlConnection(void)'
 /tmp/ccvKKWW7.o(.text+0x80d): undefined reference to
 `MysqlConnection::~MysqlConnection(void)'
 /tmp/ccvKKWW7.o(.rodata+0x1ac): undefined reference to `mysql_date
 type_info node'
 /tmp/ccvKKWW7.o(.rodata+0x1e4): undefined reference to `mysql_time
 type_info node'
 /tmp/ccvKKWW7.o: In function `MysqlDate type_info function':
 /tmp/ccvKKWW7.o(.gnu.linkonce.t.__tf9MysqlDate+0x18): undefined
 reference to `mysql_date type_info function'
 /tmp/ccvKKWW7.o: In function `MysqlTime type_info function':
 /tmp/ccvKKWW7.o(.gnu.linkonce.t.__tf9MysqlTime+0x18): undefined
 reference to `mysql_time type_info function'
 /tmp/ccvKKWW7.o: In function `MysqlRes::~MysqlRes(void)':
 /tmp/ccvKKWW7.o(.gnu.linkonce.t._._8MysqlRes+0x1b): undefined reference
 to `MysqlResUse::~MysqlResUse(void)'
 /tmp/ccvKKWW7.o: In function `MysqlQuery::preview(void)':
 /tmp/ccvKKWW7.o(.MysqlQuery::gnu.linkonce.t.preview(void)+0x1b):
 undefined reference to `SQLQuery::str(SQLQueryParms const ) const'
 /tmp/ccvKKWW7.o: In function `MysqlRes::num_rows(void) const':
 /tmp/ccvKKWW7.o(.MysqlRes::gnu.linkonce.t.num_rows(void) const+0x14):
 undefined reference to `mysql_num_rows'
 /tmp/ccvKKWW7.o: In function `MysqlQuery::store(SQLQueryParms ,
 query_reset)':
 /tmp/ccvKKWW7.o(.MysqlQuery::gnu.linkonce.t.store(SQLQueryParms ,
 query_reset) +0x40): undefined reference to `SQLQuery::str(SQLQueryParms
 const , query_reset)'
 /tmp/ccvKKWW7.o: In function
 `MysqlFieldNames::MysqlFieldNames(MysqlResUse const *)':
 /tmp/ccvKKWW7.o(.MysqlFieldNames::gnu.linkonce.t.(MysqlResUse const
 *)+0x4d): undefined reference to `MysqlFieldNames::init(MysqlResUse
 const
 *)'
 /tmp/ccvKKWW7.o: In function `MysqlResUse::num_fields(void) const':
 /tmp/ccvKKWW7.o(.MysqlResUse::gnu.linkonce.t.num_fields(void)
 const+0x12): undefined reference to `mysql_num_fields'
 /tmp/ccvKKWW7.o: In function `MysqlRes::fetch_row(void) const':
 /tmp/ccvKKWW7.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xd8):
 undefined reference to `mysql_fetch_row'
 /tmp/ccvKKWW7.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xec):
 undefined reference to `mysql_fetch_lengths'
 /tmp/ccvKKWW7.o: In function `MysqlRes::data_seek(unsigned int) const':
 /tmp/ccvKKWW7.o(.MysqlRes::gnu.linkonce.t.data_seek(unsigned int)
 const+0x1c): undefined reference to `mysql_data_seek'
 /tmp/ccvKKWW7.o: In function `MysqlConnection::store(basic_stringchar,
 string_char_traitschar, __default_alloc_templatetrue, 0  const )':
 /tmp/ccvKKWW7.o(.MysqlConnection::gnu.linkonce.t.store(basic_stringchar
 ,
 string_char_traitschar, __default_alloc_templatetrue, 0  const
 )+0x1d): undefined reference to
 `MysqlConnection::store(basic_stringchar, string_char_traitschar,
 __default_alloc_templatetrue, 0  const , bool)'
 /tmp/ccvKKWW7.o: In function `FieldTypes::FieldTypes(MysqlResUse const
 *)':
 /tmp/ccvKKWW7.o(.FieldTypes::gnu.linkonce.t.(MysqlResUse const *)+0x4d):
 undefined reference to `FieldTypes::init(MysqlResUse const *)'
 collect2: ld returned 1 exit status




 Please please someone help.   This is REALLY starting to get on my
 nerves now!!

 Thanks lots
 David Ayliffe ([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 

Re: Please HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!!!

2001-04-11 Thread B. van Ouwerkerk


[root@sp mysql]# chown -R root /usr/local/mysql -- The problem
chown: /usr/local/mysql: No such file or directory

Where is mysql installed this messages says it's not in /usr/local/mysql

Search your system.. and chown the equivalent of the /usr/local/mysql

Bye,


B.


-
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: PLEASE HELP ME TO START

2001-04-04 Thread B. van Ouwerkerk

At 10:41 4-4-01 +0200, hanan khader wrote:
Hi friends ...
I have sent once my problem, but don't know why, I haven't recieved any 
answer or solution for it ...

Perhaps because you try to run MySQL on Windows.. I think most people on 
this list are familiar with MySQL on Linux.

I found a link in the manual:
http://www.analysisandsolutions.com/code/mybasic.htm This is supposed to be 
a beginners MySQL tutorial for setting up MySQL on Windooz.

Many many links can be found if you use your favorit searchengine.

Bye,


B.



-
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: Please help me finding a sql-statement

2001-03-16 Thread Peter Holm

HI,
If I understand your question, you need two queries:

select count(*) as count, ip, value from log group by ip

select count(*) as count, ip, value from log group by ip,value

that leads to the right direction! thanks! It shows me a the ips with
their values and how many times they are in the table.
That brings me somehow nearer to the solution but I am still getting mad
about not finding exactly what I need (you know that feeling? its like
having jam in the head!) I want to get the number of rows which have the
same ip and same/different value. The questions are:

1. How many rows have same values for field x and y?
2. How many ips have different values for field x (and same field y)?
   (more interesting)

Lets have a test-table:
id value timestamp 
 1   a  
 1   a  
 2   a  
 2   b  
 3   a  
 3   a  
 3   b  

The queries should return in this case:
1. 4 rows (have same id/value)
2. 2 (ids have different values for for field 'value')

As I am seeking differences here, after this it will be interesting to
see a list of this 2 ids and their values:
id val
2  a
2  b
3  a
3  b

So I could make it to:
There are 2 different values for id "2" : a,b
There are 2 different values for id "3" : a,b

Maybe you got an idea?

Many thanks for your attention!


A small table for testing:

CREATE TABLE test (
   id tinyint(1) DEFAULT '0' NOT NULL,
   value char(1) NOT NULL
);

#
# Dumping data for table 'test'
#

INSERT INTO test VALUES ( '1', 'a');
INSERT INTO test VALUES ( '1', 'a');
INSERT INTO test VALUES ( '2', 'a');
INSERT INTO test VALUES ( '2', 'b');
INSERT INTO test VALUES ( '3', 'a');
INSERT INTO test VALUES ( '3', 'a');
INSERT INTO test VALUES ( '3', 'b');


-
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: Please help me finding a sql-statement

2001-03-16 Thread Peter Holm

Hi,

something, that gets quite near to what I want is:
select a.id, a.value, b.value 
from test as a left join test as b on a.id=b.id 
group by a.id, a.value having a.valueb.value;

It spits out the right data, but not the way I want...
++---+---+
| id | value | value |
++---+---+
|  2 | b | a |
|  3 | b | a |
|  3 | c | a |
|  3 | d | a |
++---+---+

Just a little bit closer...




Have a nice thread,
Peter

-
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: Please help me finding a sql-statement

2001-03-16 Thread Peter Holm

Hi,
sometimes one has to have the feeling, that somebody wants to help to
get it done better! :) I think I got it:

select a.id, a.value from test as a left join test as b on a.id=b.id
where a.value  b.value group by a.id,a.value;

Its good to check logtables!

Of course I would appreciate suggestions of doing this better! 


Thanks for your help!






Have a nice thread,
Peter

-
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: Please Help me ..Apache_1.3.17+php-3.0.16+mysql-3.23.32

2001-02-16 Thread Fabian Gonzalo

I can't  to compile this
I'm getting the following error on my gmake (most snipped for brevity).

gcc  -DSOLARIS2=280 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite
-DNO_DL_NEEDED -I/usr/local/include -I/usr/local/include/mysql `./apaci`
-L/usr/local/lib -R/usr/local/lib  \
  -o httpd buildmark.o modules.o modules/php3/libphp3.a
modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a
regex/libregex.a lib/expat-lite/libexpat.a  -R/usr/local/lib/mysql
-L/usr/local/lib/mysql -Lmodules/php3 -L../modules/php3 -L../../modules/php3
-lmodphp3-lpam -lm -ldl -lsocket -lnsl  -lresolv
-lsocket -lnsl
Undefined   first referenced
 symbol in file
mysql_get_client_info   modules/php3/libphp3.a(mysql.o)
mysql_drop_db   modules/php3/libphp3.a(mysql.o)
mysql_close modules/php3/libphp3.a(mysql.o)
mysql_fetch_lengths modules/php3/libphp3.a(mysql.o)
mysql_free_result   modules/php3/libphp3.a(mysql.o)
mysql_create_db modules/php3/libphp3.a(mysql.o)
mysql_field_seekmodules/php3/libphp3.a(mysql.o)
mysql_list_fields   modules/php3/libphp3.a(mysql.o)
mysql_fetch_row modules/php3/libphp3.a(mysql.o)
mysql_real_querymodules/php3/libphp3.a(mysql.o)
mysql_real_connect  modules/php3/libphp3.a(mysql.o)
mysql_stat  modules/php3/libphp3.a(mysql.o)
mysql_fetch_field   modules/php3/libphp3.a(mysql.o)
mysql_list_dbs  modules/php3/libphp3.a(mysql.o)
mysql_select_db modules/php3/libphp3.a(mysql.o)
mysql_store_result  modules/php3/libphp3.a(mysql.o)
mysql_list_tables   modules/php3/libphp3.a(mysql.o)
mysql_data_seek modules/php3/libphp3.a(mysql.o)
mysql_init  modules/php3/libphp3.a(mysql.o)
ld: fatal: Symbol referencing errors. No output written to httpd
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/scratch/webdev/apache_1.3.12/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/scratch/webdev/apache_1.3.12'
make: *** [build] Error 2


Thanks.

Fabian Gonzalo

[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