Thanks Jim, worked like a charm.
> -Original Message-
> From: Jim Lucas [mailto:li...@cmsws.com]
> Sent: Thursday, June 07, 2012 4:08 PM
> To: Jack
> Cc: PHP
> Subject: Re: [PHP] help with query
>
> On 06/07/2012 09:37 AM, Jack wrote:
> > $query = "sele
On 06/07/2012 09:37 AM, Jack wrote:
$query = "select a.startdate, a.articleid, c.name, a.title, a.intro,
a.datecreated from articles as a, categories as c where (a.startdate = -1 or
a.startdate<= {$now}) and (a.enddate = -1 or a.enddate>= {$now}) and
a.categoryid = c.categoryid order by a.startda
Jack wrote:
>Hello All,
>
>
>
>I have this string defined for my query and it shows the different
>types of
>categories fine, but when I change a.categoryid = c.categoryid to
>a.categoryid = 1 which is only one of the categories
>
>It shows me the same record twice.
>
>
>
>$query = "select a.st
Hello All,
I have this string defined for my query and it shows the different types of
categories fine, but when I change a.categoryid = c.categoryid to
a.categoryid = 1 which is only one of the categories
It shows me the same record twice.
$query = "select a.startdate, a.articleid, c.name
Hi,
I want to create a new column or table from queries of the values of
columns I( already have.
My table is :
PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS
products_id products_extra_fields_id products_extra_fields_value
1
1
Hi I need the students that didn't take an exam. The tables:
exams(id_test, title, desciption, )
results(id_student, id_test, date, qualification...)
I'm using a version of MySQL that doesn't support NOT IN, then I tried in
this way:
SELECT * FROM exams LEFT JOIN results ON exams.id_test=r
Thanks guys!
- Daniel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Hi,
>
> i can?t seem to get my head to wake up...
>
> How would i do to count how many different values that exists in a mysql
> field? Ie i have a date-field and need to know how many different dates
that
> exists in the table.
select count(distinct name) from site; in Mysql
Valentin Petruche
$number=mysql_num_rows(mysql_query("SELECT DISTINCT date FROM $table"));
Op zaterdag 09 februari 2002 13:41, schreef Daniel Alsén:
> Hi,
>
> i can´t seem to get my head to wake up...
>
> How would i do to count how many different values that exists in a mysql
> field? Ie i have a date-field and ne
Hi,
i can´t seem to get my head to wake up...
How would i do to count how many different values that exists in a mysql
field? Ie i have a date-field and need to know how many different dates that
exists in the table.
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704
10 matches
Mail list logo