select woes

2002-01-31 Thread Victoria Reznichenko

George,

Wednesday, January 30, 2002, 7:08:53 PM, you wrote:
GME Hello.

GME If anyone has a quick moment, I would appreciate some suggestions with
GME regards to the following select statement:

GME SELECT widget_src FROM widgets WHERE items.foo='abc123' and
GME item_details.item_type='I' and items.item_detail_id=foo.item_detail_id;

GME Upon execution, I'm getting ERROR 1109: Unknown table 'items' in where
GME clause.  However, widgets, items and item_details all exist, in
GME the same database.

 SELECT widgets.widget_src
  FROM widgets, items, item_details, foo
  WHERE items.foo='abc123'
AND item_details.item_type='I'
AND items.item_detail_id=foo.item_detail_id;




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




select woes

2002-01-30 Thread George M. Ellenburg

Hello.

If anyone has a quick moment, I would appreciate some suggestions with
regards to the following select statement:

SELECT widget_src FROM widgets WHERE items.foo='abc123' and
item_details.item_type='I' and items.item_detail_id=foo.item_detail_id;

Upon execution, I'm getting ERROR 1109: Unknown table 'items' in where
clause.  However, widgets, items and item_details all exist, in
the same database.

In looking at the MySQL manual, section 6.4.1 (SELECT syntaxt), the
following is written: You can refer to a column as col_name,
tbl_name.col_name, or db_name.tbl_name.col_name. which I'm doing, and
all tables referenced are in the same database.  Here's the following
output from mysql status:

mysql status
--
mysql  Ver 11.15 Distrib 3.23.44, for -freebsd4.4 (i386)

Connection id:  295
Current database:   test_database
Current user:   root@localhost
Current pager:  stdout
Using outfile:  ''
Server version: 3.23.44
Protocol version:   10
Connection: Localhost via UNIX socket
Client characterset:latin1
Server characterset:latin1
UNIX socket:/tmp/mysql.sock
Uptime: 5 days 20 hours 55 min 10 sec

Threads: 1  Questions: 13038  Slow queries: 0  Opens: 200  Flush tables:

1  Open tables: 7 Queries per second avg: 0.026
--

mysql

If anyone has any suggestions or pointers to nudge me in the right
direction, I'd be most appreciative.

--George Ellenburg


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

2002-01-30 Thread John Cichy

You must also define the tables you want to 'look' at in the 'FROM' clause

On Wednesday 30 January 2002 12:08, George M. Ellenburg wrote:
 Hello.

 If anyone has a quick moment, I would appreciate some suggestions with
 regards to the following select statement:

 SELECT widget_src FROM widgets WHERE items.foo='abc123' and
 item_details.item_type='I' and items.item_detail_id=foo.item_detail_id;

 Upon execution, I'm getting ERROR 1109: Unknown table 'items' in where
 clause.  However, widgets, items and item_details all exist, in
 the same database.

 In looking at the MySQL manual, section 6.4.1 (SELECT syntaxt), the
 following is written: You can refer to a column as col_name,
 tbl_name.col_name, or db_name.tbl_name.col_name. which I'm doing, and
 all tables referenced are in the same database.  Here's the following
 output from mysql status:

 mysql status
 --
 mysql  Ver 11.15 Distrib 3.23.44, for -freebsd4.4 (i386)

 Connection id:  295
 Current database:   test_database
 Current user:   root@localhost
 Current pager:  stdout
 Using outfile:  ''
 Server version: 3.23.44
 Protocol version:   10
 Connection: Localhost via UNIX socket
 Client characterset:latin1
 Server characterset:latin1
 UNIX socket:/tmp/mysql.sock
 Uptime: 5 days 20 hours 55 min 10 sec

 Threads: 1  Questions: 13038  Slow queries: 0  Opens: 200  Flush tables:

 1  Open tables: 7 Queries per second avg: 0.026
 --

 mysql

 If anyone has any suggestions or pointers to nudge me in the right
 direction, I'd be most appreciative.

 --George Ellenburg


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

2002-01-30 Thread Gerald Clark

But you are only selecting FROM 'widgets'.


I think you need to buy an introductory book on SQL.

I would also suggest 'MySQL' by Paul DuBois ( published by  New Riders ).


George M. Ellenburg wrote:

Hello.

If anyone has a quick moment, I would appreciate some suggestions with
regards to the following select statement:

SELECT widget_src FROM widgets WHERE items.foo='abc123' and
item_details.item_type='I' and items.item_detail_id=foo.item_detail_id;

Upon execution, I'm getting ERROR 1109: Unknown table 'items' in where
clause.  However, widgets, items and item_details all exist, in
the same database.




-
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