basic question

2002-10-13 Thread Edward Peloke

sql query

when I am defining a table, how do I set the default of a datetime column to
the current time?  I tried setting the default to now()  but it just fills
the column with 00:00 etc..

Thanks,
Eddie


-
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: Complex SQL query problem...

2002-09-23 Thread Edward Peloke

great!  hope it works !

-Original Message-
From: Richard Bolen [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 9:17 AM
To: MySQL Mailing List (E-mail)
Cc: Edward Peloke
Subject: RE: Complex SQL query problem...


FYI - this query seemed to work.

select * from nodes
left join nodes as n2 on n2.parent_id = nodes.node_id
left join jobs on jobs.parent_id = nodes.node_id
left join colors on colors.parent_id = nodes.node_id
where nodes.node_id = ?
and ((n2.parent_id is not NULL) or (jobs.parent_id is not NULL) or
(colors.parent_id is not NULL))


I need to do some more testing to be sure.

Rich

-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 08:46
To: Richard Bolen
Subject: RE: Complex SQL query problem...


After I sent this it hit me that it may not work if the first table (jobs)
contained no rows...I believe this would only work if the tables left joined
were empty not the jobs table.  sorry...

I apologize  did not respond Friday but I left work at 4.

Eddie

-Original Message-
From: Richard Bolen [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 4:19 PM
To: Edward Peloke
Subject: RE: Complex SQL query problem...


Does this handle the case where the ID is in the submissions table but not
the jobs table?  How would this look if there was a third table also?

Thanks again for you help!

Rich

-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 15:59
To: MySQL Mailing List (E-mail)
Subject: RE: Complex SQL query problem...


try a left join

select count(*) from jobs
 left join submissions on
   jobs.standard_id=submissions.color_id
   where jobs.standard_id=ID_VALUE and submissions.color_id is null


Eddie

-Original Message-
From: Richard Bolen [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 2:37 PM
To: MySQL Mailing List (E-mail)
Subject: Complex SQL query problem...


I'm trying to use a sql query to determine if an ID exists in any of 3
different tables in the database.  I need to do this in one SQL query
(ideally only using the ID once in the query).  I'm using mysql 3.23.47.

Here's an example of a query I came up with:

select count(*) from jobs, submissions where ID_VALUE in (jobs.standard_id,
submissions.color_id)


I'm just trying to determine if the ID exists.

This query works *IF AND ONLY IF* there is at least one record in each of
the tables.  If any of the table are empty, this query always returns a
count of 0 (even if there is a match in one of the non-empty tables).

Does anyone know why this is happening or could someone suggest a alternate
query?

Thanks,
Rich


Rich Bolen
Senior Software Developer
GretagMacbeth Advanced Technologies Center
79 T. W. Alexander Drive - Bldg. 4401 - Suite 250
PO Box 14026
Research Triangle Park, North Carolina 27709-4026  USA
Phone:  919-549-7575 x239,  Fax: 919-549-0421

http://www.gretagmacbeth.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


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Complex SQL query problem...

2002-09-20 Thread Edward Peloke

try a left join

select count(*) from jobs
 left join submissions on
   jobs.standard_id=submissions.color_id
   where jobs.standard_id=ID_VALUE and submissions.color_id is null


Eddie

-Original Message-
From: Richard Bolen [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 2:37 PM
To: MySQL Mailing List (E-mail)
Subject: Complex SQL query problem...


I'm trying to use a sql query to determine if an ID exists in any of 3
different tables in the database.  I need to do this in one SQL query
(ideally only using the ID once in the query).  I'm using mysql 3.23.47.

Here's an example of a query I came up with:

select count(*) from jobs, submissions where ID_VALUE in (jobs.standard_id,
submissions.color_id)


I'm just trying to determine if the ID exists.

This query works *IF AND ONLY IF* there is at least one record in each of
the tables.  If any of the table are empty, this query always returns a
count of 0 (even if there is a match in one of the non-empty tables).

Does anyone know why this is happening or could someone suggest a alternate
query?

Thanks,
Rich


Rich Bolen
Senior Software Developer
GretagMacbeth Advanced Technologies Center
79 T. W. Alexander Drive - Bldg. 4401 - Suite 250
PO Box 14026
Research Triangle Park, North Carolina 27709-4026  USA
Phone:  919-549-7575 x239,  Fax: 919-549-0421

http://www.gretagmacbeth.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


-
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: laptops

2002-09-13 Thread Edward Peloke

thanks guys for the info!  The idea of an iMac really interests me but I
need something so I can do some work on our apps here at work and they are
windows based and I would also like to start learning c#.

Eddie

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 6:43 PM
To: Edward Peloke; [EMAIL PROTECTED]
Subject: Re: laptops


At 16:21 -0400 9/12/02, Edward Peloke wrote:
Forgive me for getting off topic but I am thinking of buying a new laptop.
Which brands do you all trust?  I don't have much to spend at all.  I am
leaning towards a compaq since they are offering an upgrade to xp pro for
free (which I will need) and a free wireless card.  I am looking for a
decent machine to do php and mysql work on.

Thanks,
Eddie

I use an iBook running Mac OS X.  It's got MySQL, Perl (DBI), PHP, Python
(DB-API), Java (JDBC), Apache, Tomcat, and Ruby running on it.

You can't use BDB tables under Mac OS X, though.  There is some kind of
mutex problem that prevents BDB from working.

-
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




ot-Laptops

2002-09-12 Thread Edward Peloke


Forgive me for getting off topic but I am thinking of buying a new laptop.
Which brands do you all trust?  I don't have much to spend at all.  I am
leaning towards a compaq since they are offering an upgrade to xp pro for
free (which I will need) and a free wireless card.  I am looking for a
decent machine to do php and mysql work on.

Thanks,
Eddie


-
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




laptops

2002-09-12 Thread Edward Peloke

Forgive me for getting off topic but I am thinking of buying a new laptop.
Which brands do you all trust?  I don't have much to spend at all.  I am
leaning towards a compaq since they are offering an upgrade to xp pro for
free (which I will need) and a free wireless card.  I am looking for a
decent machine to do php and mysql work on.

Thanks,
Eddie


-
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




mysql max

2002-09-05 Thread Edward Peloke

I am new to MySql and am trying to learn PHP in conjunction with MySql.  The
webpage that I want to create will benefit from stored procedures.  Are
these available with MySqlMax?  If so, is it setup the same way as MySql?

Thanks,
Eddie


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

2002-09-05 Thread Edward Peloke


So is there really any benefit to using MySql Max?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Iikka Meriläinen
Sent: Thursday, September 05, 2002 3:53 PM
To: Edward Peloke
Cc: [EMAIL PROTECTED]
Subject: Re: mysql max


Hello,

As of this writing, MySQL doesn't support stored procedures. It will most
probably support them in 4.x versions to come.

However, there are millions of web pages that use PHP in conjunction with
MySQL without stored procs, although they would certainly benefit of them,
but those sites work fine.

Regards,
Iikka

On Thu, 5 Sep 2002, Edward Peloke wrote:

 I am new to MySql and am trying to learn PHP in conjunction with MySql.
The
 webpage that I want to create will benefit from stored procedures.  Are
 these available with MySqlMax?  If so, is it setup the same way as MySql?

 Thanks,
 Eddie


 -
 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


**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**


-
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




defaults

2002-04-25 Thread Edward Peloke

How do I add defaults to a table?  In SQL Server I can simply write

columnname  bit null constraint defaultname default (0)

when I create the table.

Thanks,
Eddie

-
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




trace tools for MySql

2002-03-06 Thread Edward Peloke

Does anyone have any good tools for putting a trace on an MySql server.  I
want to be able to see what is happening on the server.

Thanks,
Eddie


-
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




connecting to all databases using one odbc connection..PLEASE HELP

2002-03-05 Thread Edward Peloke

I asked yesterday but got no responses...anyone have any ideas how I can use
one odbc connection but have access to all databases on the MSSQL server???

Thanks,
Eddie

-
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




profiler...

2002-03-04 Thread Edward Peloke

Does anyone know if there is a good profiler to use on MySql, for example,
in SQL Server, you can start the 'profiler' and it will tell you everything
that is happening on the server.

Thanks,
Eddie


-
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




accessing all dbs through one odbc connection..

2002-03-04 Thread Edward Peloke

I need to have access to all the databases on my server using one ODBC
connection.  Currently, I have to specify the db and only have access to
that one...is there a way around this?  How about SQL Links?

Thanks,
Eddie


-
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




more than one owner?

2002-03-01 Thread Edward Peloke

Is it possible to specify more than one owner in a mysql db?  I want to
create tables with different owners.

Thanks,
Eddie


-
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: more than one owner?

2002-03-01 Thread Edward Peloke


I was thinking more along the lines of creating a db called test and
creating two tables:
test.clients and test2.clients

Like you can do in MSSQL, create many table owners in the same db.
-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 11:00 AM
To: [EMAIL PROTECTED]
Subject: more than one owner?


Edward,
Friday, March 01, 2002, 5:25:23 PM, you wrote:

EP Is it possible to specify more than one owner in a mysql db?  I want to
EP create tables with different owners.

Yes, it's possible. You can specify many users with different grants
on the same database, table, column...

You should use GRANT statement. For more clarity look at:
http://www.mysql.com/doc/G/R/GRANT.html

EP Eddie





--
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   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


-
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




odbc...

2002-02-28 Thread Edward Peloke

Is it possible to have global access to all databases using the new odbc
driver?  For example I have an app that uses more than one table owner.  In
Mysql, I had to set up a db for each owner but when I try to connect through
the odbc, I don't have access to all the databases, just one.  How can I get
access to them all?

Thanks,
Eddie


-
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