What is the 'idx' for when you already have an 'id' column? Also, you
need an index on the column that you are joining on; having a single
indexed column on a table doesn't automatically improve all queries
against that table. Put an index on the 'email_address' fields of both
tables. You'll ne
1235468 Sep 5 2002 /lib/libc-2.2.93.so
>
> -rw-r--r--1 root root 2233342 Sep 5 2002 /usr/lib/libc.a
>
> -rw-r--r--1 root root 178 Sep 5 2002 /usr/lib/libc.so
>
> Configure command: ./configure '--prefix=/usr/local/mysql'
&
artTable AS t3 WHERE
> > > > t2.cart_id=t3.cart_id
> > > > > AND t1.id=t2.customer_index AND
> > t3.submitted='1'
> > > > AND
> > > > > t3.product_index='1' AND t3.quantity>0
> > > > > GROUP BY t1.email ORDER
gt; > > I'd be hard pressed to find every occurrence out
> > of 1000 records, but I
> > > DID quickly spot two exact same records which
> > means the email address
> > > was not grouped.
> > >
> > > What can I do or where did I go wrong?
&g
7;s??
Yes. You need to count the number of times an IP appears and sort by
that count, then limit it:
SELECT ip, COUNT(ip) as num
FROM iptable
GROUP BY ip
ORDER BY num DESC
LIMIT 10
--
. Garth Webb
. [EMAIL PROTECTED]
.
. shoes * éå * schoenen * ëí * chaussures * z
| recordid | int |
> cs_com | [23] |
> | basic | sorder | Relative Order | numeric| int |
> | [23] |
> | basic | con_type | Content Type:| recordid | int |
> con_type | [23] |
> +-++-
7;top' while the script is
running? MySQL has tweakable limits on how large a particular insert
can be, but this error looks like perl is truely running out of memory,
rather than being denied by MySQL.
--
. Garth Webb
. [EMAIL PROTECTED]
.
. shoes * éå * schoenen * ëí * chaussures * zapatos
. S
for security; if one goes down, I'll have a
> back up.
>
> Thanks.
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
--
. Garth Webb
. [EMA
You might have better luck with this on the [EMAIL PROTECTED] list,
re: why this doesn't work. This works for me though:
$pk = $dbh->{mysql_insertid};
On Mon, 2004-06-14 at 21:42, Daniel Kasak wrote:
> Hi all.
>
> I'm writing an app in Perl / Gtk2, and I'm having trouble with DBI's
> last_
You could also try:
SELECT owner, COUNT(*) FROM pet GROUP BY owner;
SELECT FOUND_ROWS();
On Mon, 2004-06-14 at 20:41, Dave Torr wrote:
> Thanks - this did not work for me as I am on 4.0.17 - presumably this works
> on 4.1 (seems to need the SubQuery feature)? If so I will upgrade
> imme
> > part ...
> >
> > - hcir
>
> That's what I needed. Thanks!
Note that this solution will be off by one if there aren't any zeros in
your data. Try this:
select count(IF(field>0,NULL,1)) +
count(distinct IF(field>0,field,NULL))
from test;
--
.
n key back to the correct table...
>
>
>
> And should I have a table that links orgs and events and contacts and
> events, or should I have one lookup table
>
> That relates them all together, i.e. orgs contacts, and events..?
>
>
>
> To simplify, is It
> use the SET syntax so I could list all my old fields right
> next to my new fields, so that I didn't have to
> skip up and down 40 lines to see how I have them matched up.
>
> So does INSERT ... SET ... work? How?
>
> -Paul
>
>
--
. Garth Webb
. [EMAIL PROTECTE
you are
successful at that, and you still think Dreamweaver will save you time,
then move to using Dreamweaver to create your pages. Only after you've
figured out all the intermediate steps will it be possible to fix the
code dreamweaver outputs when it goes wrong.
Garth
--
. Garth Webb
first example you'd use:
SELECT * FROM names WHERE username BETWEEN 'a' and 'ld' AND
first_name BETWEEN 'al' and 'leao'
Note that for the end condition of each comparison the last letter is
increased by one letter so that it complete
On Thu, 2004-05-06 at 07:24, luther van dam wrote:
> I am new to MySQL but I some basic database experience.
> I have about 50,000 rows of data in a CSV file.
>
> Where I can find some examples of SQL scripts that show how to:
> a. Create a database X.
> b. Create a table Y.
> c. Import the 50,
n't the same every time, but in an
arbitrary database specific order, they might as well be random.
> bob
> At 12:55 PM 5/3/2004, Garth Webb wrote:
> >On Mon, 2004-05-03 at 10:39, Boyd E. Hemphill wrote:
> > > My boss says that if you do a select statement against a table the
On Mon, 2004-05-03 at 10:39, Boyd E. Hemphill wrote:
> My boss says that if you do a select statement against a table the
> result set always comes back in the same order. I say that this is a
> myth and that the result is random, except when some ordering is
> specified in the SQL statement.
>
>
On Fri, 2004-04-30 at 06:03, Richard A. DeVenezia wrote:
> I'm running 4.1.1a-alpha-max-nt using innodb tables with foreign keys .
> I know how to use SHOW TABLE STATUS to see the referential linkages in the
> COMMENT column.
>
> Supppose I am typing away in MySQL monitor:
> Q: Is there a way to
On Mon, 2004-04-26 at 14:59, Matthias Eireiner wrote:
> hi there,
>
> I have a basic question:
> how can I simplify multiple OR statements in a WHERE clause where I have
> only one column to which I refer?
>
> e.g.
>
> SELECT word FROM word_table WHERE id = 1 OR id = 34 OR id = 78 OR id = 8787
ther than a string, so it
> has MMDDHHMMSS values. So it looks like I'll need to do some type of
> substring on it.
You could keep any index you have and do it this way:
SELECT a,b FROM x WHERE queue_time BETWEEN date_format(curdate(),
"%Y%m%e00") AND date_format(curdate(), "%Y%m%e235959");
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
r list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>
>
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
ce condition is to
lock your tables, but your program running on the slave database would
have to be able to connect to the master. Your slave program would lock
the necessary tables on the master side, wait to receive the lock, wait
until the slave had caught up, do your merge, then release the lock.
c, and may not be
> compatible with future versions of MySQL to be a good choice.) Please help!
>
>
> Thanks in advance!
> Shawn
> [EMAIL PROTECTED]
>
> ** delete all the parts with "no" in them to reveal my real address. **
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
e. Just the Net You Need.
>
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
ehow I am feeling there is a better way to
> do all this...
This has the same problems as the LIKE '%100%203%' approach, but a full
text search is replaced by math on each row. In both cases you lose the
ability to use any kind of index.
> Sorry for this long letter I hope I hav
t 5
>
>
>
> Length/Values
>
> 5
>
>
>
> Charset
>
> Latin1
>
>
>
> Attributes
>
> unsigned
>
>
>
> Null
>
> Not_null
>
>
>
> Default**
>
> ?
>
>
>
> Extra
>
> auto_increment
>
>
>
> I'm not sure what to enter for Default**. Can someone tell me what I'm
> missing?
>
> I'm using MySQL5.0alpha w/PHP4.3.4 on W2K3.
>
>
>
> Thanks
>
>
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
u will not lose data when you sort.
So what exactly is your question? A question ans some examples of
things you have tried already would help.
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
= 'TX' AND
transaction.added between '20030101000000'
and '20031231235959';
?
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
t pageid, count(pageid) as count from first group by pageid order
by count;
> BUT how do I get the last page they have visited? a sort of reverse GROUP BY???
> Which would return...
>
> pageidcount
> 42
> 21
>
> Please Help its driving me nuts :S
If you want the last page seen, then you could change the 'min' to a
'max' in the statements above.
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
rron wrote:
> Greetings -
> Been scouring the docs for this all day and I come up with nothing for
> 'delimiter' - Id like to change the default delimiter in mysql to something
> other than tab.
> Is there a command to do this, and what are the options?
>
> Thank
t this:
select Unit, sum(InputOctets), sum(OutputOctets)
from your_table
where date between '2004-02-01 00:00:00' and
'2004-02-29 23:59:55'
group by Unit;
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
.
Some final notes. While this problem may have existed previously, I
only noticed it when I began deleting old log data by date via a
script. Furthermore, only the first 2000 or so earliest dates cannot be
selected. All dates after this 'blackout' period can be selected
without a problem.
--
|- Garth Webb -|
|- [EMAIL PROTECTED] -|
signature.asc
Description: This is a digitally signed message part
33 matches
Mail list logo