Re: [PHP] Braindead



Chris Haensel wrote:
Hi guys,

maybe I am too stupid, but I can not see a solution for this. Have been
cracking up my brain for the last hours, so I finally dare to ask.

I have a database table with some columns


text1 | text2 | text3 | text4
----------------------------------------------


Now, for some stats thingy, I am trying to get the COUNT of distinct entries
So, i would like to get the count of entries where text2 is foo OR text3 is
foo

I have 20.863 entries at the moment, and it takes quite a lot of time
reading through that stuff.
I have tried

SELECT COUNT(*) as mycount FROM mytable WHERE text2 = 'foo' and text3 =
'foo'

but I neither get an error nor any output. It just loads and loads without
any output...

I am out of ideas :o( Help, anybody? :o))

Chris




The amount of records is not that big to slow things down. Did you use
indexes on your database? And did you try running the query through
commandline or phpMyAdmin?

.



Relevant Pages

  • Braindead
    ... cracking up my brain for the last hours, so I finally dare to ask. ... Now, for some stats thingy, I am trying to get the COUNT of distinct entries ... i would like to get the count of entries where text2 is foo OR text3 is ... It just loads and loads without ...
    (php.general)
  • RE: repeated conversion of data summarized into rows and columns
    ... the database name, table name and field names I used in the code. ... Dim currentUser As String ... ' Column Pointer to work through Hour entries ... Dates and to the HoursDates table and containing a usage entry. ...
    (microsoft.public.excel.misc)
  • Re: Multiple Record Inputs with one Form
    ... For intCount = 1 To Me! ... the entries from the form inputed. ... "Jeff Boyce" wrote: ... database will let you do. ...
    (microsoft.public.access.formscoding)
  • Re: Commas in URLs?
    ... > entries are also commonly used for this purpose, ... > used bibliographic database app EndNote has a "URL" field in each entry. ... > the multiple keywords in EndNote Keywords field, ... > delimiter for individual keywords in that field is the comma. ...
    (comp.infosystems.www.authoring.html)
  • New Shareware: MyIdeasJournal version 1.1
    ... MyIdeasJournal is a database program that you can use to capture ... Searching for entries by subject is also very easy and fast. ... listbox item. ... you are either in Search mode or in Browse mode. ...
    (comp.software.shareware.announce)