Hi,
I'm getting an unknown colum `num` in where clause error with this query:
$options = mysql_query("select options.*,
count(option_items.optionID) as `num`
from options
left join option_li
I need to sum the field *COST* in this query where data in *STATUS* is
equal to "HELD" and "OPEN", so I will have 2 totals passed below and do
not know where to begin .
All information is in 1 table.
Original query
select distinct(Company_name), account, City, State from table where
number
ngliche Nachricht-
> Von: Doug Parker [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 2. Oktober 2003 20:31
> An: [EMAIL PROTECTED]
> Betreff: [PHP-DB] query problem
>
>
> I'm having a problem with a specific query.
>
> SELECT DISTINCT(contents_.company_id)
I'm having a problem with a specific query.
SELECT DISTINCT(contents_.company_id), companies.* FROM contents_, companies
WHERE contents_.Products LIKE '%heating%'
OR contents_.Manufacturer LIKE '%heating%'
AND contents_.company_id = companies.id
The query works fine without the "OR" segment, for
<[EMAIL PROTECTED]>
.net.il> cc:
Subject: RE: [PHP-DB] Query problem
ssage-
From: Ron Allen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 11:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Query problem
I have done this in the past, but for some reason it isn't working now
(maybe a moron). I am trying to select all of the empty or NULL fields
in
How would the entire query look
select * from ticket where Type = 'Phone' and ???
"Dirk Kredler" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Am Dienstag, 22. Juli 2003 11:29 schrieb Ron Allen:
> > This is what I have
> > select * from ticket where Type = 'Line' and Closeddate
select * from ticket where Type = 'Line' and (Closeddate IS NULL OR
Closeddate ='')
or
select * from ticket where Type = 'Line' and Closeddate IS NULL
HTH
Peter
-Original Message-
From: Ron Allen [mailto:[EMAIL PROTECTED]
Sent: 22 July 2003 10:29
To: [EMA
Am Dienstag, 22. Juli 2003 11:29 schrieb Ron Allen:
> This is what I have
> select * from ticket where Type = 'Line' and Closeddate = ' empty space'
> and have tried the following
> select * from ticket where Type = 'Line' and Closeddate = 'Null'
> select * from ticket where Type = 'Line' and Close
I have done this in the past, but for some reason it isn't working now
(maybe a moron). I am trying to select all of the empty or NULL fields in a
column.
This is what I have
select * from ticket where Type = 'Line' and Closeddate = ' empty space'
and have tried the following
select * from ticket
On Tuesday 22 January 2002 13:18, Sommai Fongnamthip wrote:
> Hi,
> I have problem with these mysql's query:
>
> select * from holder, management where holder.id=management.id or
> (holder.name=management.name and holder.surname=management.surname) order
> by holder.no
>
> It ta
Hi,
I have problem with these mysql's query:
select * from holder, management where holder.id=management.id or
(holder.name=management.name and holder.surname=management.surname) order
by holder.no
It take a long time (more than 1 minute) with thousand record. I have
the query. that way you avoid an expensive if or
or or or ...
Steve
> -Original Message-
> From: Russ Michell [mailto:[EMAIL PROTECTED]]
> Sent: 26 April 2001 10:50
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Query problem cont'd..
>
>
> Hi there:
>
>
Hi there:
I'm stil having problems with this query in that it doesn't bring up any results!
Here is the menu that refreshes the page and deposites the var: 'sortedBy'
into play:
--select one--
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
The SQL qery:
if(
($sortedBy == 'Jan') || ($sor
> My PHP-embedded query is as follows:
>
> else if($sortBy == '01') {
> $sql = "SELECT * FROM $table_cal WHERE item_activity='$id' AND
>DATE_FORMAT('item_date','%m') LIKE '$sortBy'";
> $sortBy = "Month of January";
> }
>
> * '$sortBy' is equal to '01'.
> * MySQL isn't complainin
Hi all:
I'm using mysql-3.22.32:
My PHP-embedded query is as follows:
else if($sortBy == '01') {
$sql = "SELECT * FROM $table_cal WHERE item_activity='$id' AND
DATE_FORMAT('item_date','%m') LIKE '$sortBy'";
$sortBy = "Month of January";
}
* '$sortBy' is equal to '01'.
16 matches
Mail list logo