Re: Request modelling

2003-07-11 Thread John Coder
On Fri, 2003-07-11 at 13:41, Nils Valentin wrote:
 Hi MySQL Fans ;-)
 
 I would like to list all courses with have less than lets say 10 participants. 
 Does anybody know how I would have to modify the code below to get this to 
 work ?
 
 schedule_id is the course itself
 
 
 SELECT schedule_id,count(schedule_id) FROM attendance WHERE 
 count(schedule_id)10 GROUP BY schedule_id ;
 
 My problem is that I would need to use the count function actually within the 
 WHERE (clause which is not allowed). 

Try 
SELECT schedule_id,count(schedule_id) as attendees FROM attendance WHERE
antendees10 GROUP BY schedule_id ;

Johnn Coder



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



Re: mysqldump ERROR 1064

2003-01-04 Thread John Coder
On Sun, 2003-01-05 at 00:00, David  Angela Ehmer wrote:
 Hi
 
 I am having problems generating the mysqldump file.  I have tried a range of
 options and carefully studied several tutorials I have on using this
 command.  Each time I get the following errror.
 
 ERROR 1064 you have an error in your SQL syntax near 'mysqldump -u root -p
 adrienne netno_db sql.dump' at line 1.
 
 Don't have a space between p and password it should be as :
mysqldump -u root -padrienne netno-db  sql.dump



-
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




certification exam

2002-12-27 Thread John Coder
sql, query, mysql,I'm a lumberjack and I'm ok for he spam police.

 

Has anyone been successful in signing up for the certification exam?
I've entered dates going up to Jume 30,2003 to schedule an exam and all
I get back is exam not available.

John



-
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 dilemma

2002-12-27 Thread John Coder


Hi all,

I am kinda of a beginner in this mysql thing, so please excuse the dumb
and amateur question:

i have a table with several date fields: day, month, year, hour, minute
and i need to order them by a specific string that includes them, like
this:

year/month/day - hour/minute

basically i need some select command like this:

SELECT * FROM NEWS ORDER BY year/month/day - hour/minute DESC LIMIT 10

How can i do such a thing?

Thanks.

look at:
http://www.mysql.com/doc/en/String_functions.html

John Coder





-
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 in Query

2002-12-07 Thread John Coder
On Sat, 2002-12-07 at 21:50, Deepak Suthar wrote:
 I'm using Phpadmin to add these fields with these values, and it keeps
 crashing...what am I missing?
 
 -Deepak
 
 Error
 
 SQL-query :
 
 CREATE TABLE `db` (`host` VARCHAR(localhost) NOT NULL, `db` VARCHAR(dsuthar)
 NOT NULL, `user` VARCHAR(dsuthar) NOT NULL, `select_priv` VARCHAR(Y) NOT
 NULL, `insert_priv` VARCHAR(Y) NOT NULL, `update_priv` VARCHAR(Y) NOT NULL,
 `delete_priv` VARCHAR(Y) NOT NULL, `create_priv` VARCHAR(Y) NOT NULL,
 `drop_priv` VARCHAR(Y) NOT NULL)
 
 MySQL said:
 
 
 You have an error in your SQL syntax near 'localhost) NOT NULL, `db`
 VARCHAR(dsuthar) NOT NULL, `user` VARCHAR(dsuthar) NOT' at line 1

AFAIK 'localhost'(a string) is not a viable qualifier for VARCHAR.
VarChar is used as a variable CHAR type MySQL is looking for a integer
so as to tell how large to make VARCHAR at it's largest value.I  suggest
you read:
http://www.mysql.com/doc/en/Storage_requirements.html

John Coder



-
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: Table setup question

2002-12-05 Thread John Coder
On Thu, 2002-12-05 at 14:42, Beauford.2003 wrote:
 Adolfo,
 
 Thanks for the info, but can you elaborate on it, 'cause basically I am just
 not getting the concept. No way no how can I get these joins to work.
 
 mysql describe songs;  (this contains an ID field and the title of the song
 and the artist.)
 ++-+--+-+-+---+
 | Field  | Type| Null | Key | Default | Extra |
 ++-+--+-+-+---+
 | ids| int(11) |  | PRI | 0   |   |
 | title  | varchar(55) | YES  | | NULL|   |
 | artist | varchar(30) | YES  | | NULL|   |
 ++-+--+-+-+---+
 3 rows in set (0.00 sec)
 
 mysql describe album;  (this contains an ID field and the name of the album
 the above songs came from.)
 +---+-+--+-+-+---+
 | Field | Type| Null | Key | Default | Extra |
 +---+-+--+-+-+---+
 | ida   | int(11) |  | PRI | 0   |   |
 | name  | varchar(35) | YES  | | NULL|   |
 +---+-+--+-+-+---+
 2 rows in set (0.00 sec)
 
 mysql describe reference; (this contains the ID's that corrspond to the
 above two tables.)
 +---+-+--+-+-+---+
 | Field | Type| Null | Key | Default | Extra |
 +---+-+--+-+-+---+
 | ida   | int(11) |  | PRI | 0   |   |
 | ids   | int(11) |  | PRI | 0   |   |
 +---+-+--+-+-+---+
 2 rows in set (0.00 sec)
 
 This table is in this format: The left column corresponds to the ID of the
 ablum and the right field correspond to the ID of the song. From the example
 below, you can see that song #1 appears on Albums 2, 3, 6, and 16.
 
 SongAlbum
 12
 13
 16
 115
 27
 221
 223
 
 So with all this information, how would I perform a select that would show
 the all the albums a particular song were on. (from the example above what
 would I need to do to show the album name and song title for song ID # 1
 above).
 

Try 
Select name from album join reference join songs where
album.ida=reference.ida and reference.ids=songs.ids and
songs.title='sometitle';

John Coder



-
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: Limit and order by

2002-12-05 Thread John Coder
MYSQL
On Thu, 2002-12-05 at 17:00, Michelle de Beer wrote:
 How can I limit the result after the order by has
 been executed? This stops efter 100 rows and the
 result is not as I intended...
 
 Select * from mytable ORDER by total desc limit 0, 100
 
 Must this be done in PHP?
 
 Thanks for all replys to my topics, btw.
 
 What exactly do you want all you state is what you don't want.

John Coder





-
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: Limit and Order by

2002-12-05 Thread John Coder
On Thu, 2002-12-05 at 19:39, Michelle de Beer wrote:
  you mean mySQL does the search on 100 first entries
  and then order the
  results, instead of getting the results and
  returning only the first 100 ?
  If yes I too would like to know what's the right way
  to do it in SQL then ?
 
 That is correct. This is what I have:
 
 One table with 1000 records. Two columns, students
 names (name) and the total score of a test (total)
 
 When I try this query, I sort by the highest total:
 Select * from mytable ORDER by total desc
 
 When on the other hand I use this query, mySQL only
 takes the first hundred rows and sorts them:
 Select * from mytable ORDER by total desc limit 0, 100
 
 The problem is that there can be a very high score at
 row 234, that should be in the top one hundred result,
 but this is left out.
 
 So the question is, can I limit the result and get all
 the highest scores from my table with a query, or do I
 have to add a counter in my PHP-script that breaks out
 of the loop at 100?
 
 Thanks,
 // Michelle
 sql, query
 Try this query then:
 select name,max(total) from mytable

John Coder
 


-
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: importing form a file (question)

2002-11-20 Thread John Coder
On Wed, 2002-11-20 at 18:19, Stick Dragon wrote:
 I had a free mysql database and admined with phpmyadmin. well i got a back 
 up from called backup.sql
 
 in side the file it looks like this
 
 # Table structure for table `phpbb_auth_access`
 #
 
 CREATE TABLE phpbb_auth_access (
   group_id mediumint(8) NOT NULL default '0',
   forum_id smallint(5) unsigned NOT NULL default '0',
 editied for space
   KEY forum_id (forum_id)
 ) TYPE=MyISAM;
 
 #
 # Dumping data for table `phpbb_auth_access`
 #
 
 INSERT INTO phpbb_auth_access VALUES (21,10,1,1,1,1,1,1,1,1,1,'','','');
 INSERT INTO phpbb_auth_access VALUES (4,9,1,1,1,1,1,1,1,1,1,'','','');
 editied for space
 INSERT INTO phpbb_auth_access VALUES (19,10,1,1,1,1,1,1,1,1,1,'','','');
 # 
 
 is there a way to run, and restore the database with this file. i dont have 
 phpmyadmin installed, didnt really like the prog and trying to learn mysql 
 through the console.

you can run this type of file through the console. at the mysql prompt
type:
\. file.sql

without the  of course.
look at the help blurb when you do a \h at the mysql prompt.


John Coder


-
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 help needed with mysql : part II

2002-11-09 Thread John Coder
On Sat, 2002-11-09 at 14:45, john wrote:
 
 
 Ok.. I got the /etc/my.cnf under control, but now when I do this:
 
 root@rock:/etc# mysqladmin -u root -h rock password *
 mysqladmin: connect to server at 'rock' failed
 error: 'Host 'rock.biohazard.org' is not allowed to connect to this 
 MySQL server'
 
 Then I tried this:
 
 root@rock:/etc# mysqladmin create testDB
 mysqladmin: connect to server at 'localhost' failed
 error: 'Access denied for user: 'root@localhost' (Using password: NO)'
 
 in /etc/group, I added root and my user john to the mysql group.. but 
 that did not help.
 
 If there is something in the manual, please point it out to me, so I can 
 figure this mess out.
 
 Thanks a million
 
 John


Have you ran mysql_install_db?


John Coder



-
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: little problem, I need some help...

2002-11-09 Thread John Coder
On Sat, 2002-11-09 at 19:34, 3mip1s4la-Emilio Pisanty wrote:
 
   tables have met with a 1175 error (You are using safe update mode and you
   tried to update a table without a WHERE that uses a KEY column). 
  Nothing is obvious and is hard to advise you if you don't give us some more
  info on the table structure and the update query you have trouble with.
  
  /h
 
 ok. thable structure is this:
 mysql describe pupils;
 +--+-+--+-+-+---+
 | Field| Type| Null | Key | Default | Extra |
 +--+-+--+-+-+---+
 | name | varchar(20) | YES  | | NULL|   |
 | surname  | varchar(20) | YES  | | NULL|   |
 | surname2 | varchar(20) | YES  | | NULL|   |
 | form | char(3) | YES  | | NULL|   |
 | tutor| varchar(20) | YES  | | NULL|   |
 | sex  | char(1) | YES  | | NULL|   |
 | birth| date| YES  | | NULL|   |
 | math | char(3) | YES  | | NULL|   |
 | optA | char(3) | YES  | | NULL|   |
 | optB | char(3) | YES  | | NULL|   |
 +--+-+--+-+-+---+
 10 rows in set (0.00 sec)
 
 it was built in version 3.23, and we recently updated to 4.0.4 beta.
 
 the query I'm running is 
 
 mysql UPDATE pupuils SET tutor = 'URIOSTEGUI' WHERE group = 'U6U';
 (setting the name of the tutor for Upper 6)
 
 and I meet with:
 ERROR 1175: You are using safe update mode and you tried to update a table 
 without a WHERE that uses a KEY column
 
 I don't quite understand what a KEY column is, can someone explain it to 
 me? if you can't answer, where can I find error listings? because they 
 don't appear to be on the site.
 
 hope this helps you help me...
 well a couple of things I see.
1. you have no group in field  so it can't compare U6U to anything.
2. I don't think you can use a field name group anyway since group is
reserved in mysql
3. you have no key in your table therefore you can't do a conditional
statement (where) to compare it to.
Error 1175 is the error that was reported to you.
You are using safe update mode and you tried to update a table  
without a WHERE that uses a KEY column


-
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: Help with mysql_fetch_array

2002-11-09 Thread John Coder
On Sat, 2002-11-09 at 23:53, Chip Shabazian wrote:
 ok, here is my code without all of the html (sorry people).  I'm trying
 to get a sum of the field runtime.  With this code, I get Resource id
 #3 as an error.  Any help getting me to the proper result would be
 greatly appreciated.
 
 ?
 @$db = mysql_pconnect(localhost,dviewd);
 mysql_select_db(dvds);
 $query = select * from list order by title;
 $result = mysql_query($query);
 $num_results = mysql_num_rows($result);
 $dvd_time_query = select sum(runtime) from list;
 $dvd_time_result = mysql_query($dvd_time_query);
add this line;
$dvd_result=mysql_result($dvd_time_result,0,0);
 
 echo td class=mfont size = -1b.$dvd_result./b/td;
//change $dvd_time_result to $dvd_result
 ?



-
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 Installation

2002-11-08 Thread John Coder
On Fri, 2002-11-08 at 14:12, SpyProductions Support Team wrote:
 
 I just installed the most recent version of MySQL with an RPM (through
 webmin interface), but it doesn't seem to have installed a
 mysqladmin.anyone know why?  :)
 
 Thanks!
 
 -Mike
 
Probably you just installed the server not the client you need both.


-
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: Intersecting entities

2002-11-07 Thread John Coder
On Wed, 2002-11-06 at 23:25, Richard Forgo wrote:
 Sorry for being vague.  I think the closest thing I can find to it is,
 possibly, a three-way join. I'm trying to figure out how to write the
 query.
 
 I've got the following tables:
 
 systems
 
 sys_nameID
 
 Abrams  202
 Patriot 544
 Stinger 229
 
 ... and ...
 
 new_req
 
 proj_name   ID
 
 Test Bed Alpha  344
 Tracked Wheels  989
 Battle Monitor  823
 Shoulder Harness654
 Ammo Flask  454
 Spotter 773
 
 There may be multiple new requirements for a single system.  To
 accommodate them, I created a new table -- an intersecting entity is
 what I recall it being called -- to bridge the two.  I can't keep the
 multiple references to new_req in the systems table, nor can I keep them
 in the new_req table.  As best I can figure, I need to have a bridge
 table ... e.g.,
 
 ie_sys_req
 
 sys_id proj_name_id
 
 202344
 202989
 202823
 544654
 544454
 544773
 
 If this seems peculiar, have patience with me I'm new at this.  If it's
 right, let me know so I can breath a sigh of relief.  And if the
 structure is right, could someone offer some guidance on how a query
 that allows me to query new_req using the intersecting entity (or
 three-way join, whatever it's called) would be written.
 
 Thanks,
 
 
 Rik Forgo
 JIST3
 Army Test, Training and Technology Integration Office (T3I)
 Diverse Technologies Corp.
 (c) 443.463.8571
 (h) 410.859.8474
 
 
  -Original Message-
  From: John Ragan [mailto:jragan;arkansas.net]
  Sent: Wednesday, November 06, 2002 6:55 PM
  To: [EMAIL PROTECTED]; Richard Forgo
  Subject: Re: Newbie: Intersecting entities
  
  
  if a succinct statement is possible, perhaps you
  could give us an idea of its nature?
  
  somebody may be familiar with the concept under a
  different name.
  
  
   I'm trying to find some documentation on creating intersecting
 entities
   in MySQL, but haven't been able to track any info down on the MySQL
 site
   or on the web.  At least we called them intersecting entities while
 I
   was in Oracle training (which was some time ago).  I think I
 remember
   how to set them up, but I'd love to have something to refer to
 quickly
   before I start.  Can anyone point me in the right direction?
  

There is an example and full blown script in a book by Michael Koffler
called MYSQL. His Url is www,Kofler.cc If I remember it correctly he had
a intersecting entity involving Authors and Publishers in his
mylibrary example.

John Coder 


-
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: SQL Query

2002-11-07 Thread John Coder
On Thu, 2002-11-07 at 16:17, [EMAIL PROTECTED] wrote:
 Hi,
 
 I have the following SQL query, that returns the correct records on Access, 
 but when I use it with MySQL, it returns duplicate records, and it skips the 
 required records.
 
 SearchSQL=select 
 MarketData.CustID,Contacts.ContactID,Contacts.CustID,MarketData.Nickname,Marke
 
 tData.Occupation,MarketData.Country 
 ,County,MarketData.Forename,MarketData.Surname,MarketData.Email FROM 
 MarketData INNER JOIN Contacts on MarketData.CustID=Contacts.ContactID WHERE 
 Contacts.CustID=6115

I personally would try:

SearchSQL=select 
MarketData.CustID,Contacts.ContactID,Contacts.CustID,MarketData.Nickname,
MarketData.Occupation,MarketData.Country,County,MarketData.Forename,
MarketData.Surname,MarketData.Email FROM MarketData INNER JOIN Contacts
WHERE MarketData.CustID=Contacts.ContactID AND Contacts.CustID=6115

John Coder


-
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 newbie

2002-11-05 Thread John Coder
On Tue, 2002-11-05 at 11:21, Ken Arck wrote:
 I'm confused John. Since --with-mysql=shared,/usr'  appears in the
 Configure Command table from phpinfo(), doesn't that mean php *was*
 compiled with mysql support?

Yes it was compiled with mysql support through tje dbx commands look at
the manual for PHP condcerning dbx. My copy says it's experimental. I
suggest looking at php.net for some online documentation concerning dbx.
 
 At 12:03 AM 11/5/2002 -0500, John Coder wrote:
 On Mon, 2002-11-04 at 23:51, Ken Arck wrote:
   
   then it's compiled under dbx functions not mysql functions run
  configure again with the same arguments except for mysql just run
  --with-mysql and it should be ok.
  
  -As I said, it was installed from an rpm as part of the Redhat install
  package and not from a tarball. Are you saying to reinstall from a tarball
  after running configure?
  
 Either complile it from a tarball or get the src.rpm go in change the
 neccessary file in the src.rpm  and compile it. ( which file I don't
 know). I personally know of no way to change your configure options
 without running make and make install.
 
 
 
 
 -
 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
 
 
 --
 President - Arcom Communications
 Amateur Radio Station AH6LE
 Curious about the weather in Orygun? Check out
 http://www.ah6le.net/weather.html
 http://www.ah6le.net
 http://www.ah6le.com
 AH6LE/R - IRLP Node 300
 http://www.irlp.net
 
 RC Websites
 http://oregonbarnstormers.rcclubs.com
 http://pegasus.rcplanet.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: Using Query Results in a Form

2002-11-05 Thread John Coder
On Tue, 2002-11-05 at 20:23, Ben C. wrote:
 I am using the following query:
 
 $sql =SELECT company, name, email FROM $table_name 
WHERE email = '$_POST[email]' AND password = password('$_POST[password]'); 
 
 Then I am echoing the $email on my form (it works because the person has posted 
their e-mail name when logging in).  How can I echo the company and email on to my 
form as well.  Please help.
 
 Is this query on your form or the form that the person has filled out?

John Coder


-
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 help needed with mysql

2002-11-04 Thread John Coder
On Mon, 2002-11-04 at 18:52, john wrote:
 
 
 When I start safe_mysqld , I get a command prompt back again and ps aux
 shows this:
 
 mysql30269  0.0  0.1 10580 1024 pts/1S17:38   0:00 
 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql 
 --pid-file=/var/lib/mysql/rock.pid
 mysql30271  0.0  0.1 10580 1024 pts/1S17:38   0:00 
 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql 
 --pid-file=/var/lib/mysql/rock.pid
 mysql30272  0.0  0.1 10580 1024 pts/1S17:38   0:00 
 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql 
 --pid-file=/var/lib/mysql/rock.pid
 
 Next I tried this:
 
 mysqladmin create testDB and I got this error:
 
 root@rock:/archives# mysqladmin create testDB
 
 mysqladmin: connect to server at 'localhost' failed
 error: 'Can't connect to local MySQL server through socket 
 '/var/run/mysql/mysql.sock' (111)'
 Check that mysqld is running and that the socket: 
 '/var/run/mysql/mysql.sock' exists!
 
, 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
 


 Chek your my.cnf file and see where it points to for the mysql.sock file.it should be 
under the client portion of it. 

if you don't have a my.cnf file hat's your prob right there. Copt one of the cnf files 
to /etc and you should be up and running.


-
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




insert into ...selct union

2002-11-04 Thread John Coder
Is it possible to do a insert into blah
(select...)union(select.) 
with mysql 4.03?

John Coder




-
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 newbie

2002-11-04 Thread John Coder
On Mon, 2002-11-04 at 21:51, Ken Arck wrote:
 Hi folks. I'm a real newbie to mysql (believe it or not!)
 
 While just starting to get my feet wet in it, I've come across a huge
 stumbling block already. I am familiar with php however.
 
 A php script I'm playing with has this line:
 
 $db = mysql_connect(localhost, root);
 
 Here's the html output
 
 Fatal error: Call to undefined function: mysql_connect() in
 /var/www/test.php on line 15
 
 I even tried the updated command line with the same failed result
 
 $db = mysql_real_connect(localhost, root);
 
 BTW, doing a phpinfo() shows that mysql is compiled into php (I'm using PHP
 Version 4.1.2 )
 
 Any help would be appreciated.
 
 Ken
 What exactly do you mean by compiled in ? what does your phpinfo say.
You should have a section on mysql not just the line supported databases
mysql,pgsql,etc.  
Here's what mine says 
mysql
MySQL Support
enabled
Active Persistent Links
0
Active Links
0
Client API version
4.0.3-beta
MYSQL_MODULE_TYPE
external
MYSQL_SOCKET
/tmp/mysql.sock
MYSQL_INCLUDE
-I/usr/local/mysql/include
MYSQL_LIBS
-L/usr/local/mysql/lib -lmysqlclient
Directive
Local Value
Master Value
mysql.allow_persistent
On
On
mysql.default_host
no value
no value
mysql.default_password
no value
no value
mysql.default_port
no value
no value
mysql.default_socket
no value
no value
mysql.default_user
no value
no value
mysql.max_links
Unlimited
Unlimited
mysql.max_persistent
Unlimited
Unlimited 

Hope thois helps


-
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 newbie

2002-11-04 Thread John Coder
On Mon, 2002-11-04 at 23:20, Ken Arck wrote:
 At 10:32 PM 11/4/2002 -0500, you wrote:
  
  What exactly do you mean by compiled in ? what does your phpinfo say.
 You should have a section on mysql not just the line supported databases
 mysql,pgsql,etc.  
 
 it reports mysql in two places:
 
 In the Configure Command table:
 
 --with-mysql=shared,/usr
 
 and under the dbx table:
 
 supported databases
 
 MySQLbr /ODBCbr /PostgreSQLbr /Microsoft SQL Serverbr /FrontBase
 
 then it's compiled under dbx functions not mysql functions run
configure again with the same arguments except for mysql just run
--with-mysql and it should be ok.

John



-
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 newbie

2002-11-04 Thread John Coder
On Mon, 2002-11-04 at 23:51, Ken Arck wrote:
  
  then it's compiled under dbx functions not mysql functions run
 configure again with the same arguments except for mysql just run
 --with-mysql and it should be ok.
 
 -As I said, it was installed from an rpm as part of the Redhat install
 package and not from a tarball. Are you saying to reinstall from a tarball
 after running configure?
 
Either complile it from a tarball or get the src.rpm go in change the
neccessary file in the src.rpm  and compile it. ( which file I don't
know). I personally know of no way to change your configure options
without running make and make install.




-
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 to join two tables?

2002-10-26 Thread John Coder
On Sat, 2002-10-26 at 00:03, Andre Kirchner wrote:
 Hi there,
 
 I would like to know, if it's possible in the mysql to
 use two tables as if they were one and have an index
 that  would use columns of these two tables?
 
Depends upon the version you are using look up merge  at www,mysql.com

John Coder



-
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: Lost Connection

2002-10-24 Thread John Coder
On Fri, 2002-10-25 at 00:14, Lewis Watson wrote:
 
 - Original Message -
 From: Mark Matthews [EMAIL PROTECTED]
 To: Lewis Watson [EMAIL PROTECTED]
 Sent: Thursday, October 24, 2002 8:40 PM
 Subject: Re: Lost Connection
 
 
  Lewis Watson wrote:
  
  I am getting this same error. I have tried reseting, flushing,
 rebooting
  
   the
  
  server. Please let me know if you find anything on this...
  Thanks.
  Lewis
  
  This is RedHat GLIBC upgrade badnessSearch the mailing list over the
  last 4 weeks, you'll see what I mean.
  
  For now, you'll have to use our (MySQL AB's) binaries, as we compile and
  link statically with our own version of GLIBC, so you don't have this
  problem.
  
  Download 3.23.53a, and this problem goes away.
  
  -Mark
  
  
  
   Hey Mark,
   I am running FreeBSD.
   Thanks,
   Lewis
 
  Are you using your own binary, or one of ours?
 
  -Mark
 
 
 OPS. Sorry, I have had my head up this bsd machine so intensely that I
 forgot which machine it happened on... Please forgive me, it did happen on a
 Redhat 7.0? 7.1 build of Redhat! I compiled it from source
 ./config --prefix=/usr/local. I am so sorry. This is a production machine...
 What's the best way to upgrade from this to 3.23.53a? I greatly appreciate
 your help.
 Lewis
 
according to mysql compiling from source has probs if you are using gcc
2.96 so they suggest using their binaries
do a gcc -v and see what version of gcc you use.

John Coder 


-
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 to execute sql commands from a file?

2002-10-22 Thread John Coder
On Tue, 2002-10-22 at 16:24, Fernando Grijalba wrote:
 You can try this;
 
 mysqlsource /path/source.sql
 
 or:
 
 $mysql -uuser -ppassword DBname  filename.sql
 
 HTH
 
 JFernando
 ** sql ***
 
 -Original Message-
 From: Andre Kirchner [mailto:sieg1974;yahoo.com]
 Sent: October 22, 2002 15:58
 To: [EMAIL PROTECTED]
 Subject: How to execute sql commands from a file?
 
 
 Hi there,
 
 is there a way to execute sql commands from a file?
 What would be the syntax to do it?
 I was trying mysql @theFile, but it doesn't work.
 
 Thanks,
 
 Andre
 
Also  the mysql --help shows that \. filename does it from the command prompt.


John Coder




-
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: Need help installing PHP (Linux) with MySQL and Apache

2002-10-22 Thread John Coder
On Mon, 2002-10-21 at 13:07, Chip Rose wrote:
 I can't get PHP-4.2.3 compiled to work with MySQL and Apache, despite months 
 of trying.  Apache compiled ok, and so did MySQL -both work, on my Debian 
 Linux box.
 
 I've tried various combos of installing the Deb packages, compiling from 
 source, and various combinations thereto.  I started out using 
 http://hotwired.lycos.com/webmonkey/00/44/index4a_page4.html?tw=programming 
 as a guide, in efforts to create a way of accessing MySQL via PHP Gui of some 
 sort.  I've been trying for months, on and off, using Redhat, Mandrake, and 
 now Debian3.0.  I've tried getting Escapade installed, but pages won't load 
 unless I change a line in httpd.conf, and then Apache won't run because it 
 complains of the changed line in httpd.conf, which was supposedly necessary 
 to get Escapade to run.
 
 Typing ./httpd -l in my Apache bin directory shows that mod_so.c is an 
 enabled module.  My attempt to compile PHP-4.2.3 by typing 
 ./configure --with-mysql=/usr/bin/  resulted in the following error message
 configure: error: Cannot find header files under /usr/bin/
 
 I've tried changing the path to MySQL headers, but still get same error msg.  
 I really don't know how to find these MySQL headers since I wouldn't know one 
 if I saw it.
 
 Can someone help with a pointer/link?  I'd very greatly appreciate it..
 if Mysql was installed by rpm try pointing it to /var/lib/mysql. 
if compiled by yourself it's the directory you untarred and ran make/
make install.

John


-
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: Install Problem

2002-10-07 Thread John Coder

On Mon, 2002-10-07 at 19:18, Daniel Miller wrote:
 
 I have been trying to install the  
 mysql-3.23.52-pc-linux-gnu-i686.tar.gz on my SUSE Linux 7.3 machine.
 Everything seems to be going smoothly until I entered the command
 
 ./scripts/mysql_install_db
 
 I got this output which i believe is ok;
 
 
 
 
 cords-orj86jfje:/usr/local/mysql/mysql # ./scripts/mysql_install_db
 Preparing db table
 Preparing host table
 Preparing user table
 Preparing func table
 Preparing tables_priv table
 Preparing columns_priv table
 Installing all prepared tables
 021007 18:15:39  ./bin/mysqld: Shutdown Complete
 
 
 To start mysqld at boot time you have to copy support-files/mysql.server
 to the right place for your system
 
 PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 This is done with:
 ./bin/mysqladmin -u root  password 'new-password'
 ./bin/mysqladmin -u root -h cords-orj86jfje  password 'new-password'
 See the manual for more instructions.
 
 You can start the MySQL daemon with:
 cd . ; ./bin/safe_mysqld 
 
 You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
 cd sql-bench ; run-all-tests
 
 Please report any problems with the ./bin/mysqlbug script!
 
 The latest information about MySQL is available on the web at
 http://www.mysql.com
 Support MySQL by buying support/licenses at https://order.mysql.com
 
 
 
 
 
 Then I try to enter this command to configure my passwords;
 
 Firstly
 
 cords-orj86jfje:/usr/local/mysql/mysql # ./bin/safe_mysqld --user=mysql 
 [1] 1346
 cords-orj86jfje:/usr/local/mysql/mysql # Starting mysqld daemon with databases from 
/usr/local/mysql/mysql/data
 021007 19:15:21  mysqld ended
 
 [1]+  Done./bin/safe_mysqld --user=mysql
 
 THEN,
 
 cords-orj86jfje:/usr/local/mysql/mysql # ./bin/mysqladmin -u root password sqlpass
 ./bin/mysqladmin: connect to server at 'localhost' failed
 error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'
 
 OR
 cords-orj86jfje:/usr/local/mysql/mysql # ./bin/mysqladmin -u root sqlpass
 ./bin/mysqladmin: connect to server at 'localhost' failed
 error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'
 Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
 
 What am I doing wrong ??
 
 
 Thanks, Daniel
it's easier to do this from and rpm that suse provides. if you do
reinstall using a rpm from suse before you issue the command
mysql_install_db run the command from any terminal 'rcmysql start' that
runs a script that is located in /etc/init.d . For further explanation
read the README.SUSE. I suspect the problem is where you are installing
it. by definition by tar it usually winds up wherever you tar gunzip it.
by rpm it winds up in /var/lib/mysql. I've also have done a soft link
from one to the other. Hope this helps.

John Coder




-
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: Where are db files ??

2002-10-04 Thread John Coder

On Fri, 2002-10-04 at 20:38, tmb wrote:
 HELP ! I'm a newbie to both Linux  mySQL.
 
 I have a simple mySQL sample data base running on a
 Red Hat 7.3 machine.
 
 It was already setup when I got it.
 
 Now I want to find the data base files that mySQL
 creates so I can back them up... and for my education.
 
 I can't seem to get Linux to search the entire hard
 disk... and I'm really not sure of the data base file
 names... it comes up in a demo web page.
 
 1 - Where does mySQL normally store it's data base
 files?
 
 2 - Can you change the default directory for a data
 base?
 
 3 - How do you get Linux to search the entire disk for
 a file?
 
 Thanks for any help...
 
 tmb
 look in /var/lib/mysql that's where they are placed usually by rpm. you
have to be root to to this I think though.

John Coder



-
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: RPM Install appears to have failed

2002-10-03 Thread John Coder

Max is a server.
your install directory out of an RPM should be /var/lib/mysql if you are
root su to root and see if it's there. It should tell you this in
/usr/share/doc/packages/Mysql
thwere's a manual there or it should be.  

John Coder 
On Thu, 2002-10-03 at 21:55, Chris Becker wrote:
 Thanks Praveen,
 
 So Max is not a server version, it sure is difficult to determine that on 
 the download page:
 
 MySQL database server  standard clients:
 ·   MySQL 3.23 -- Stable release (recommended) latest version is 3.23.52
 ·   ·   3.23 -- Default package (use this if you are unsure)
 ·   ·   3.23 Max -- Package with maximum features
 
 Should I now download 3.23 (Default pkg) and run the rpm, how will this 
 affect what happened on my server below? Is there a way to un-install the 
 client and Max? Or should I just install 3.23 and all will be better?
 
 Thanks again.
 
 Chris
 
 
 
 At 06:23 PM 10/3/2002 -0700, you wrote:
 Hi,
 
 Where is the Mysql-server version. you have installed
 only client and mysql-max, but no mysql-server. Use
 rpm -Uvh for your installations, so that you can
 easily know the progress of installation.
 
 regards,
 Praveen
 --- Chris Becker [EMAIL PROTECTED] wrote:
  
   RedHat6.2 install (everything) out of box on Intel 1
   proc server 256mb ram.
  
   Downloaded 3.23.52-1 rpm  client rpm to
   /usr/loca/tmp - i created the tmp
   folder as root and chmod 777
  
   Followed the install instructions - which only
   included:
  
   To perform a standard minimal installation, run:
   shell rpm -i MySQL-VERSION.i386.rpm
   MySQL-client-VERSION.i386.rpm
  
   (No user or group or environment setup instructions
   before running rpm's???)
  
   So logged in as root I executed the following, and
   got the result below
  
   [root@plinux tmp]# rpm -i
   MySQL-Max-3.23.52-1.i386.rpm
   MySQL-client-3.23.52-1.i386.rpm
   Giving mysqld a couple of seconds to restart
   var/tmp/rpm-tmp.10346: /etc/rc.d/init.d/mysql: No
   such file or directory
  
   Was this successful? Where did mysql install to?
  
   The post installation steps say to:
  
   shell ./scripts/mysql_install_db
   shell cd mysql_installation_directory
   shell ./bin/safe_mysqld --user=mysql 
  
   cd_mysql_installation_directory - where the heck did
   it install at? don't
   think this happened...
  
   thanks in advance.
  
  
  
   Chris Becker
   MCDBA MCSE
   http://www.PrismSoftware.com
   [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
  
 
 
 __
 Do you Yahoo!?
 New DSL Internet Access from SBC  Yahoo!
 http://sbc.yahoo.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
 
 Chris Becker
 MCDBA MCSE
 http://www.PrismSoftware.com
 [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: RPM Install appears to have failed

2002-10-03 Thread John Coder

On Thu, 2002-10-03 at 23:26, Chris Becker wrote:
 
 Your right - Max is a server, thank you.
 
 Directories you listed do not exist. That rpm is all honked up. Is there an 
 UN-install flag for rpm? I would like to cleanly reverse what was done w/ 
 the rpm and install from the binary, is this possible?  The workaround 
 provided below does not seem to be tested, before I cause any more damage I 
 would like to clean the orig install up, if it even did anything... Thanks.
 I beleive the command is rpm -e package

-e for erase I assume 

John Coder

 Found this thread:
 
 Subject: MySQL-Max-3.23.52-1.i386.rpm is missing many files.
 From: alg
 Date: Sat, 21 Sep 2002 20:17:05 -0400
 
  Description:
 
I'm trying to install MySQL MAX 3.23.52 (MySQL, with
transactions enabled).  My rpm attempts goes like this...
 
1. Check for installed MySQL...
 [root@Zeke mysql]# rpm -q -a | fgrep -i mysql
 [root@Zeke mysql]#
 
2. Nothing, so I attempt an install...
[root@Zeke mysql]# rpm -i MySQL-Max-3.23.52-1.i386.rpm
 
Giving mysqld a couple of seconds to restart
var/tmp/rpm-tmp.34280: /etc/rc.d/init.d/mysql: No such file or directory
 
QUESTIONS
1. Why is the mysql start/stop script missing?
2. In addition, OTHER FILES are missing, as compared to the
   tar/gzip binary:
 mysql-max-3.23.52-pc-linux-gnu-i686.tar.gz
 
 
Thanks in advance.
 
/AL
 
 
  How-To-Repeat:
  1.  Download the Intel Linux RPM file: MySQL-Max-3.23.52-1.i386.rpm
  2.  su as root
  3.  rpm -i MySQL-Max-3.23.52-1.i386.rpm
  4.  See the error
/etc/rc.d/init.d/mysql: No such file or directory
 
  Fix:
  BETTER FIX:
  1. Re-build the rpm file for MySQL-Max-3.23.52
  2. While you guys are at it, provide the rpm for the other
 modules (ask RedHat for help on this, if necessary).
 
  If you want me to do some of the work, I'll volunteer the time.
  ... Just give me some RH linux box to login to. ... I have
  only 1 box at home, which I use to support my consulting
  clients, so I can't fool around with the box too much.
 
  WORKAROUND:
  1.  Install the RPM file, in spite of its problems:
  MySQL-Max-3.23.52-1.i386.rpm
 
  2.  Install tar/gzip file:
  mysql-max-3.23.52-pc-linux-gnu-i686.tar.gz
  ...This way, other rpm files that depend on MySQL-Max-3.23.52-1
  won't have problems (assuming that they are properly installed).
 
  Submitter-Id:  [EMAIL PROTECTED]
  Originator:alg
  Organization:  Al G, WowSignal.Com
  MySQL support: none
  Synopsis:  MySQL-Max-3.23.52-1.i386.rpm is missing many files.
  Severity:  serious
  Priority:  medium
  Category:  mysql
  Class: change-request
  Release:   mysql-3.23.52-max (Official MySQL-max binary)

 
 Chris Becker
 MCDBA MCSE
 http://www.PrismSoftware.com
 [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: select problem with not equal syntax

2002-09-30 Thread John Coder

On Mon, 2002-09-30 at 23:44, Gebhardt, Karsten wrote:
 I have two tables
 
 CREATE TABLE pid_segment (
 id INT NOT NULL UNIQUE PRIMARY KEY,
 msg TEXT)
 TYPE=INNODB
 
 CREATE TABLE hl7incom(
 id INT NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY REFERENCES pid_segment
 (id).
 msg TEXT,
 time TIMESTAMP NOT NULL)
 TYPE=INNODB
 
 There are few data stored in both tables. Now I will select new messages
 from hl7incom, where hl7incom.id is not equal pid_segment.id and store this
 id, msg in pid_segment.
 
 With query...
 
 SELECT hl7incom.id
 FROM hl7incom, pid_segment
 WHERE hl7incom.msg LIKE '%PID%'
 AND pid_segment.id != hl7incom.id
 GROUP BY hl7incom.id;
 
Try 

SELECT hl7incom.id
FROM hl7incom, pid_segment
WHERE hl7incom.msg LIKE '%PID%'
AND pid_segment.idhl7incom.id
GROUP BY hl7incom.id;

John Coder


-
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: RE:Mysqld always shuts down after running mysqld-problem solvedthx

2002-09-28 Thread John Coder

Just a thought look in your my.ini file and make sure the paths are
correct. I too had this problem but I was upgrading to a binary from an
rpm and that was where my problem was. the my.ini file expected the
paths to be in /var instead of /usr/local. 
Hope this helps

John Coder
 On Sat, 2002-09-28 at 10:34, [EMAIL PROTECTED] wrote:
 --- Weitergeleitete Nachricht / Forwarded Message ---
 Date: Fri, 27 Sep 2002 19:52:25 +0200 (MEST)
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Mysqld always shuts down after running mysqld
 
  Description:
  hi mysql team,
  i am a mysql newbie (my first time i install it)
  i give up, i can't solve the problem without help.
  all the time i try to start the mysqld, it ends up instantly with a
  shutdown
  of mysqld, i cant run the prog: i edited the mysqld.log and tried to
  figure
  out the problem, here it is:
  
   '/usr/local/mysql/data/kolumbus.pid' (Errcode: 13)
  020927 18:39:01  /usr/local/mysql/bin/mysqld: Can't find file:
  './mysql/host.frm' (errno: 13)
  020927 18:39:01  /usr/local/mysql/bin/mysqld: Error on delete of
  '/usr/local/mysql/data/kolumbus.pid' (Errcode: 13)
  020927 18:39:01  mysqld ended
  
  i looked for the files kolumbus.pid and didn't found one (find / -name
  kolumbus.pid)
  at the whole system. the host.frm is in the right pass.
  
  in addition the message after runnung mysqld via config module:
  
  kolumbus:/usr/local/mysql # ./configure --prefix=/usr/local/mysql/
  NOTE: This is a MySQL binary distribution. It's ready to run, you don't
  need to configure it!
  
  To help you a bit, I am now going to create the needed MySQL databases
  and start the MySQL server for you.  If you run into any trouble, please
  consult the MySQL manual, that you can find in the Docs directory.
  
  Installing all prepared tables
  020927 18:37:29  ./bin/mysqld: Shutdown Complete
  
  
  To start mysqld at boot time you have to copy support-files/mysql.server
  to the right place for your system
  
  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  This is done with:
  ./bin/mysqladmin -u root  password 'new-password'
  ./bin/mysqladmin -u root -h kolumbus  password 'new-password'
  See the manual for more instructions.
  
  NOTE:  If you are upgrading from a MySQL = 3.22.10 you should run
  the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
  able to use the new GRANT command!
  
  You can start the MySQL daemon with:
  cd . ; ./bin/safe_mysqld 
  
  You can test the MySQL daemon with the benchmarks in the 'sql-bench'
  directory:
  cd sql-bench ; run-all-tests
  
  Please report any problems with the ./bin/mysqlbug script!
  
  The latest information about MySQL is available on the web at
  http://www.mysql.com
  Support MySQL by buying support/licenses at https://order.mysql.com
  
  Starting the mysqld server.  You can test that it is up and running
  with the command:
  ./bin/mysqladmin version
  kolumbus:/usr/local/mysql # Starting mysqld daemon with databases from
  /usr/local/mysql/data
  020927 18:37:30  mysqld ended
  
  at his point i tried to start mysqld direct but it stopped instantly with
  this err message:
  
  kolumbus:/usr/local/mysql # mysqld
  Fatal error: Please read Security section of the manual to find out how
  to run mysqld as root!
  020927 19:40:13  Aborting
  
  020927 19:40:13  mysqld: Shutdown Complete
  
  so i tried to find a Security section at mysqld and mysql man pages but
  didnt find something
  
  i dont know how to work on that problem, i read the FAQ and the
  installation
  guide,
  also the documentation, but i didnt found something. i added the
  mysqlbug-output to this mail.
  I don't know if this is relevant for you: I tried to install an older
  version before i tried this one, but i didn't realize to start the older
  one so i
  picked this one. I tried to figure out the problem for 3 days now, I asked
  friends and noone could help me, so i hope u can help me.
  
  with best regards
  
  
  joshua bacher
  Submitter-Id:  submitter ID
  Originator:root
  Organization:
   organization of PR author (multiple lines)
  MySQL support: [none | licence | email support | extended email support ]
  Synopsis:  synopsis of the problem (one line)
  Severity:  [ non-critical | serious | critical ] (one line)
  Priority:  [ low | medium | high ] (one line)
  Category:  mysql
  Class: [ sw-bug | doc-bug | change-request | support ] (one line)
  Release:   mysql-3.23.48 (Source distribution)
  
  Environment:
  machine, os, target, libraries (multiple lines)
  System: Linux kolumbus 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686
  unknown
  Architecture: i686
  
  Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
  /usr/bin/cc
  GCC: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
  gcc version 2.95.3 20010315 (SuSE)
  Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS='-O2
  -march=i486
  -mcpu=i686

Re: Copying a Table

2002-09-28 Thread John Coder

Check out
http://www.mysql.com/doc/en/mysqldump.html that should help you.

John Coder
 On Sat, 2002-09-28 at 13:18, Shaun Bramley wrote:
 Hello all,
 
 I have yet to find this bit of information within the documentation.  Is it
 possible to copy the contents of a table?  If so how?
 
 Shaun
 mysql, 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: Basic RPM Installation

2002-09-27 Thread John Coder

On Fri, 2002-09-27 at 19:27, DeNewbie wrote:
 
 I am new to this newsgroup and I am a SUSE Linux 7.3 user. I want to learn how to 
use PHP and MySQL and I am reading the MySQL reference manual. Firstly I am trying to 
install these RPM files.
 
  MySQL-3.23.52-1.i386.rpm
  MySQL-client-3.23.52-1.i386.rpm
  MySQL-devel-3.23.52-1.i386.rpm
 
 They all installed successfully;
 
 Then from  /usr/local I ran mysql_install_db and I got this;
 
 
 
 cords-orj86jfje:/usr/local # mysql_install_db
 Installing all prepared tables
 020927 18:06:15  /usr/sbin/mysqld: Shutdown Complete
 
 
 To start mysqld at boot time you have to copy support-files/mysql.server
 to the right place for your system
 
 PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 This is done with:
 /usr/bin/mysqladmin -u root  password 'new-password'
 /usr/bin/mysqladmin -u root -h cords-orj86jfje  password 'new-password'
 See the manual for more instructions.
 
 NOTE:  If you are upgrading from a MySQL = 3.22.10 you should run
 the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
 able to use the new GRANT command!
 
 You can start the MySQL daemon with:
 cd / ; /usr/bin/safe_mysqld 
 
 You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
 cd sql-bench ; run-all-tests
 
 Please report any problems with the /usr/bin/mysqlbug script!
 
 The latest information about MySQL is available on the web at
 http://www.mysql.com
 Support MySQL by buying support/licenses at https://order.mysql.com
 
 
 
 
 Now at this point what do I do ??
 
 I put in my passwords successfully but when I entered the 
 safe_mysqld  I got this;
 
 
 
 
 mike@cords-orj86jfje:/usr/bin safe_mysqld 
 [1] 1759
 mike@cords-orj86jfje:/usr/bin cat: /var/lib/mysql/cords-orj86jfje.pid: Permission 
denied
 rm: cannot unlink `/var/lib/mysql/cords-orj86jfje.pid': Permission denied
 Fatal error: Can't remove the pid file: /var/lib/mysql/cords-orj86jfje.pid
 /usr/bin/safe_mysqld: /var/lib/mysql/cords-orj86jfje.err: Permission denied
 Please remove it manually and start /usr/bin/safe_mysqld again
 mysqld daemon not started

From the sounds of it you must remove those files as root since mysql is
the owner of them.

John Coder


-
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




Duplicate entries

2002-09-27 Thread John Coder
)
  die(mysql_error());
$totals=mysql_query(SELECT COUNT(deptId),sum(complete),
sum(InProgress),sum(parts),sum(deferred),
sum(reset)/sum(complete) * 100 ,sum(Tmp.reset)/$days_result 
from
Tmp);

any thoughts on the duplicates? this gives runs fine on mysql 3.2.53 but
stops at duplivcate entries on 4.03.

John Coder
 




-
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: Temporary tables

2002-09-25 Thread John Coder

On Wed, 2002-09-25 at 10:10, Keith C. Ivey wrote:
 On 25 Sep 2002, at 0:57, John Coder wrote:
 
  So it's probably the fact that I didn't make the connection persistent
  that screwed me up sometimes I feel so stupid.
 
 I don't think that will help.  Read Paul's message again.  Even if 
 you make the connection persistent, you can't be sure you'll get the 
 same connection for the other page.
 
 In a Web application, I don't think temporary tables are useful if 
 you need them to be shared between pages.  One solution I've used is 
 to create an ordinary table with a unique name and then drop it when 
 you're finished with it.
 
 -- 
 Keith C. Ivey [EMAIL PROTECTED]
 Tobacco Documents Online
 http://tobaccodocuments.org

That's what I resorted to doing and yes I cahnged it to mysql_pconnect
and it didn't make a diff.

John


-
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




Temporary tables

2002-09-24 Thread John Coder

hi all
I',m wondering if temporary tables stay around longer then the page you
use to create them if you create them with a php page. my thoughts were
they do but mine doesn't for some reason. I've made a temporary table to
query on a page that draws a pie chart out of the data in the temporary
table but when I try to access it from that page there's nothing there.




-
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: Temporary tables

2002-09-24 Thread John Coder

So it's probably the fact that I didn't make the connection persistent
that screwed me up 
sometimes I feel so stupid. hehehe

John
On Wed, 2002-09-25 at 00:34, Paul DuBois wrote:
 hi all
 I',m wondering if temporary tables stay around longer then the page you
 use to create them if you create them with a php page. my thoughts were
 they do but mine doesn't for some reason. I've made a temporary table to
 query on a page that draws a pie chart out of the data in the temporary
 table but when I try to access it from that page there's nothing there.
 
 Tables created with CREATE TEMPORARY TABLE disappear when the current
 connection closes.  They also are visible only within the connection that
 created them.
 
 So:
 
 - If you create the table from one page using a non-persistent connection,
the connection will close when the script ends and the table will
disappear and be unavailable to other pages.
 - If you create the table from one page using a persistent connection, the
connection will not *necessarily* close when the script ends.  However,
there is no guarantee that a following page will get that same connection,
in which case the table will not be visible even if it happens to still
exist.
 
 -
 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