a really powerful overriding reason, the best solution is
to have a seperate table for the array, with a foreign key that points
back to the record in the original table. That will make retrieving data
a lot easier; e.g. you can do a query with a join and
"WHERE thisField = 'j
.visitor_id
GROUP BY v1.page_id, v1.visitor_id
HAVING Max(v1.timestamp) = Max(v2.timestamp);
Substitute Min() for Max() to get the earliest visit.
Bob Hall
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
AVING Max(s1.Moment) = Max(s2.Moment);
BTW, you can't assume that your original statement will always return the
first slide. People who have tested GROUP BY statements say that the
value returned from columns with no aggregate function is somewhat
random.
Bob Hall
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
book sounds
like the best bet, when it comes out.
Bob Hall
--
Know thyself? Absurd direction!
Bubbles bear no introspection.-Khushhal Khan Khatak
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
e language section of the MySQL online manual.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sql query database
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
t the end. I know that I have to use the Danish
character set to get the correct sort for Norwegian. Check the manual
for instructions on changing character sets. It's been a while since
I've done it, and I no longer remember how.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear n
.
>
>Thanks!
>
>Nick
Sir, use GROUP BY and an aggregate function.
SELECT items.itemId, description, link, Sum(qty) AS sum_qty, price
FROM carts, items
WHERE carts.custId = '$custId' AND items.itemId = carts.itemId
GROUP BY itemId;
Bob Hall
Know thys
move
the ON conditions to the WHERE clause.
FROM city, state_prov, area_phone, ...
WHERE state_prov.state_id = city.state_id
AND area_phone.city_id = city.city_id AND ...
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sq
which contains the child records. I might be able
to figure it out if know what a kaizen is. You haven't declared any
primary keys on the employee table, and you didn't say which DBMS
you're using.
In general, pattern is
SELECT dept, Count(p.something), Count(c.something_
>On Mon, 9 Apr 2001, Bob Hall wrote:
>
> > > MySQL is providing an SQL frontend to a
> > >bunch of tables and indices, that is it ... it is up to the programmer to
> > >handle the "managing of data" part where it revolves around being
> >
f better
SQL compliance. (Although the whole team seems to share Monty's
confusion over transactions.)
I'm rooting for PostgreSQL to become the open source app that ate
Oracle. MySQL will never be capable of that, but I don't think it
needs to be. There will always be a niche for
>On Sun, 8 Apr 2001, Bob Hall wrote:
>
> > Doug,
> >
> > You've posted your usual good sense, combined with one statement I
> > strongly disagree with.
> >
> > >One of
> > >these products is a relational database management system
Doug,
You've posted your usual good sense, combined with one statement I
strongly disagree with.
>One of
>these products is a relational database management system. The other is a
>quasi-SQL-like-front-end-to-systems-of-indexed-files that has never
>concerned itself with things like standards
the project is in trouble.
There's a limit to how much a programmer can do to solve problems
caused by bad database design, as you have discovered.
Bob Hall
>Can anyone help me on this one
>Lisa
>-Original Message-
>From: Walter [mailto:[EMAIL PROTECTED]]
>Sent: Wedne
may occur again and again in B, both
>matching "thing" and not matching "thing". I want to know
>specifically the opposite of the first query (i.e. the opposite of
>"what does match the "thing" in B"), which is a bit different.
>
>Thanks much
;s
not the problem, since you say you did it in the query that worked,
but I don't see the point.
Bob Hall
>Can anyone tell me why this:
> Line 282mysql_select_db("centraldb",$db);
> Line 283$qorder++;
> Line 284$result = mysql_query("SELE
Sir, it would help to see the INSERT statement and the table definition.
Bob Hall
>I sent this message to the "general" list yesterday, and have yet to get an
>answer (except for that Spanish "Snow White" virus attempt from Peru).
>
>I'm trying to downloa
PRIMARY KEY ()
This is covered in the online manual.
If you want to use an auto_increment field as the primary key, you
can insure uniqueness in the SportName and TeamName fields by
declaring a UNIQUE INDEX in the same way.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspecti
anybody have any ideas, thanks for this guys. Any help is much
>appreciated.
>
>Scott Mebberson
Sir, I can't offer suggestions without knowing what the subquery is.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
--
PHP Da
s table B changes. Is there anyway of doing this?
>
>Please help?
>
>[EMAIL PROTECTED]
No sir. The members of the SET have to be entered as constant values
in the column definition.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
--
Yes sir, you are correct. Thank you for correcting me. In practice, a
NULL in a foreign key almost always means an orphan record. In most
applications the designer will want to use the NOT NULL constraint.
Bob Hall
>A foreign key value can be null, if it suits the data application - or t
/foreign key
relationship, you will have to specify what RDBMS you are using.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
s it doesn't know what
>I'm asking for. I'm confused. Thanks.
The pound sign is correct. If your query doesn't work with the pound
sign, then the problem is elsewhere. Post an example of your code.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection.
23 matches
Mail list logo