RE: Basic SQL Query Help Needed

2009-08-25 Thread Martin Gainty
: mysql@lists.mysql.com > From: c...@hosting4days.com > Subject: Basic SQL Query Help Needed > Date: Tue, 25 Aug 2009 16:21:45 -0700 > > I have a basic invoice table with related line items table > > Goal :I'd like to get ALL the related line items - for ALL the > &#x

Basic SQL Query Help Needed

2009-08-25 Thread c...@hosting4days.com
I have a basic invoice table with related line items table Goal :I'd like to get ALL the related line items - for ALL the 'open' invoices... -- this should get a list of open (unpaid) invoices $query_invoice = "SELECT DISTINCT ID from invoices where status = 'open'" - --

Re: select query help needed

2004-02-27 Thread Peter Brawley
Daniel, >I have a database with the following (simplified) structure: >[Products] >ProductID >ProductName >[PurchaseRecords] >ProductID >CustomerID > >I need to find all of the rows in the table Products which do not have >at least one corresponding row in PurchaseRecords. How do I transla

select query help needed

2004-02-27 Thread Dan Lamb
Hello All, I have a database with the following (simplified) structure: [Products] ProductID ProductName [PurchaseRecords] ProductID CustomerID I need to find all of the rows in the table Products which do not have at least one corresponding row in PurchaseRecords. How do I translate this

Re: MySQL Query Help Needed

2003-09-17 Thread Petre Agenbag
I think the most difficult ( if not impossible with just using mysql query) is the part where you apply your logic as to the "most relevant" keyword. You need to be able to have a mechanism of telling the query which keyword is the most relevant, ie, human logic says, the one that matches the searc

Re: MySQL Query Help Needed

2003-09-17 Thread Petre Agenbag
Not sure I understand what you need? Can you create a dummy output table of what you would like your result to look like? At first glance, from reading your question, it sounds like you simply want this: select * from ppc_keywords where keywords like "%job%" [group by keywords] order by bid; whe

MySQL Query Help Needed

2003-09-17 Thread Johan Potgieter
Can anybody help me sort my results in the correct way. My Table description is: +--+---+--+-+-++ | Field| Type | Null | Key | Default | Extra | +--+---+--+-+-++ | id

Re: query help needed.

2003-06-30 Thread Hans-Peter Grimm
anders thoresson schrieb: I'm building a planning system for a newspaper. Article ideas are defined as articles with no deadline, no publication date or no reporter assigned. I wan't to show all entries from table un_article that matches those three criterias. I have three tables: CREATE TABLE

query help needed.

2003-06-30 Thread anders thoresson
Hi, I'm building a planning system for a newspaper. Article ideas are defined as articles with no deadline, no publication date or no reporter assigned. I wan't to show all entries from table un_article that matches those three criterias. I have three tables: CREATE TABLE un_article ( a_id IN

Re: Query help needed please

2003-03-21 Thread Bruce Feist
Charles Kline wrote: I am fairly new to SQL and this is a really complex query for me. Possibly more complex than necessary. Must you have a separate column for each of the areas? If you don't mind having them all in a single column, the query becomes simple and efficient: SELECT p.fname, p.lna

Query help needed please

2003-03-21 Thread Charles Kline
Hi all, I am fairly new to SQL and this is a really complex query for me. Here is the setup. 3 tables. tbl_personnel, tbl_personnel_dras, tbl_dra each person in the tbl_personnel table can have 0 - 3 records in the tbl_personnel_dras table. The tbl_personnel_dras table is just the person_id (fro

Re: Mysql query help needed!!

2002-06-16 Thread Zak Greant
Hi Chris, On Fri, 2002-06-14 at 02:08, Chris Kay wrote: > > I have a rather longer query which I would like to get all records past todays date. >Here is my query > > $ttwo = date("YmdGi"); > >'detail_start_date_y,detail_start_date_m,detail_start_date_d,detail_start_time_h,detail_start_

Mysql query help needed!!

2002-06-13 Thread Chris Kay
I have a rather longer query which I would like to get all records past todays date. Here is my query $ttwo = date("YmdGi"); $abc = " select detail.*, type.type_name, status.status_name, staff.staff_name,

Re: Query Help Needed

2002-05-23 Thread Matthew Walker
sql,query I have a table with the following structure: CREATE TABLE cartconfig_module ( UserID int(10) unsigned NOT NULL default '0', GroupID int(10) unsigned NOT NULL default '0', SiteID int(10) unsigned NOT NULL default '0', Perms enum('Modify','View','Deny') NOT NULL default 'View',

Re: Query help needed

2001-09-03 Thread Carl Troein
Paul Mallach writes: > But I simply can't find a (good) query without using a subselect. The problem > is that I have to check, wheter the live_from value ist the maximum for all > the versions of this content-piece. Since what you want to put in a subselect will return a single value you cou

Query help needed

2001-09-03 Thread Paul Mallach
Hi. I'm thinking about a possible database schema for a content management system that is supposed to use MySQL as a backend. The system stores multiple versions for each piece of content. Content is referenced by a content-id (cid), each version gets a version-id (vid). Each version has some m

Tricky query : help needed !

2001-07-16 Thread Denis BAURAIN
Hi there, I'm new on this list because of a long query I can't write successfully. I guess I could post my question on a more general SQL list but since my database engine is MySQL I post it here. It's a bit long to read because of the care taken to explain all things. Please forgive me if I'