With a join and group by I think you have HAVING.
>>Hi all
>>
>>how to do this in MySQL? Returning only records with COUNT > 5?
>>
>>SELECT
>> `groups`.`groupsDescr`,
>> `roles`.`roles_Agroup`,
>> `roles`.`rolesDescr`,
>> COUNT(`roles`.`rolesDescr`) AS TOTAL
>>FROM
>> `roles`
>> INNER JOIN
Try back ticks around it. `DESC'
> Dear Friends.
>
> when Creating the follow table
>
> CREATE TABLE CONHEC_DBF (CON CHAR (7) ,
>SER CHAR (2) ,
>NUMNF CHAR (8) ,
>SERNF CHAR (2) ,
>LOJA CHAR (2) ,
>PAIDF CHAR (12) ,
>QUANT REAL (6,0) ,
>NOP CHAR (10) ,
>TRAN CH
echo $updatequery to screen and see what the sql looks like.
> I am trying to update a table from results generated from a select query,
> but can't seem to get the queries running right. The select query works
> fine, but when I try to use the results for an update it error out. Here
> is
> my
After the phpmyadmin login I got the same error.
In the phpmyadmin config files I had to set the local IP address that
phpmyadmin was on.
> Dear Michael,
>
> I want to use PHP, Apache, mySQL and phpMyAdmin for evaluation but I m not
> able to get this rite.
>
>
> I am trying to instal MySQL with
I like the web site www.phpbuilder.com ... lots of great articles.
> Hi All,
>
> Can someone recommend a good book for learning PHP/MySQL?
>
> TIA,
> Kay
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
10 seconds !?Unless that query is huge and without indexes, it should
run MUCH quicker.
> I'm using Oracle 8.0.5 and MySQL 4.1.1a
>
> I'm not optimizing Oracle nor MySQL, because I don't want future users
> messing with optimizations.
> I access through JDBC drivers. Oracle usually needs 10 se
How about an HTML meta tag refresh set at 20 minutes.
>>This may be slightly off-topic, apologies if so but I was wondering if
>>anyone could point me in the right direction.
>>
>>I'm currently storing applications from a web site into our mysql DB, our
>>client has a web-based backoffice. He has
One simple option would be to add a footnote column. And add in your code, if
footnote column is NOT NULL then add a * on to population and
show footnote at the bottom.
population footnote
100 null
200*yada yada
>>Suppose I have several columns of numberals - are
Using phpmyadmin, when I select Export, and click the checkbox "Save as File", it
prompts where for where and what file name.
>>I'm trying to figure out how to get my MySQL databases
>>online. Someone told me to EXPORT my databases as SQL
>>files, then go into my online websites's phpMyAdmin
>>p
Yes Local.
SELECT databasename.tablename.columnname
> Hi, two questions:
> Is it possible to select data from different Databases on the same
> server?
> Is it possible to select data from different Databases on Different
> servers across the network?
>
> I searched for information on how to do
I remember something setting mine up. The phpMyAdmin.ini (I think) had to
have the correct IP address of the machine/database it was running on.
My machines internal address was 192.168.2.100, but the INI setting had to
be the outside resolved IP 24.16.xx.xx if running it from outside.
> Hello:
I found it interesting. Thanks Eric.
>>(reconstructed from archives i accidentally deleted the copy in my mailbox
>>>Daniel Clark writes:
>>>I don't see how LIMIT would make a difference. LAST_INSERT_ID() only
>>>returns one record.
>>>Bu
I don't see how LIMIT would make a difference. LAST_INSERT_ID() only returns one
record.
But it's worth trying in a big loop to get timing numbers.
>>I have a rather simple straightforward question that I was not able to find
>>in any of the documentation.
>>I am in the process of writing an
Possibly two rows?
Can you change the where clause?
WHERE CartID=999 OR ProdID=333
> I have a simple query:
> SELECT * FROM cart
> WHERE CartID=999 AND ProdID=333
>
> The primary key is made of both CartID and ProdID, both integers.
>
> The query will not return the record in question
>
> This r
SELECT user_id, rep_nurse_1, rep_nurse_2
FROM Users
WHERE User_ID = 'x'
> I have a problem with a SELECT query. I have a users table and each user
> can
> be a Rep, Nurse or Administrator defined by User_Type. Each Rep has two
> Nurses allocated to them and the User_ID of the nurse is held in col
I see in MaxDB there is initcap() function.
http://dev.mysql.com/doc/maxdb/en/71/81738fb9b311d2a97100a0c9449261/content.htm
> I have a table with upper case text. I want to use a function in my
> select
> statement the puts this text in title case so "MORE FOO YOU WIBBLE"
> becomes
> "More Foo Y
In Oracle you can reference the second field AVG() by the field #.
ORDER BY 2
> Thanks a lot for the replies. I have changed the query as follows:
>
> **
> SELECT
> DB_ESTABLISHMENT_NAME,
> AVG(DB_GRADE)
>
> FROM
> ESTABLISHMENTS ES LEFT OUTER JOIN GRADES
I believe you have to add your AVG() to your GROUP BY clause.
> I have a sql query as follows:
>
> **
> SELECT
> DB_ESTABLISHMENT_NAME,
> AVG(DB_GRADE)
>
> FROM
> ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ON
> ES.DB_ESTABLISHMENT_ID=GR.DB_ESTABLISHMENT_I
I wonder if mysql isn't trying to process
where GMTBase > DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY)
What about doing this date subtracting in PHP and adding the result to the
SQL statement.
> Hello folks,
>
> I'm usinng MySQL 4.0.17.
>
> I have a table something like:
>
> RuleID int,
> GMTBase da
Hum. I've never tried inserting without the field names.
> Serves me right to type this stuff instead of copying/pasting - my
> previous post was indeed wrong but also wasn't the exact code I used
> (yours was, with the single quote embedded in the doubles).
>
> It's been a very dyslexic week for
How about: (I reversed on set of quotes)
sqlstr = "INSERT INTO Jobs VALUES('" & txtSceneFile & "')"
> Err...what I meant to say here was "ascii code equivalent (chr(39)" (I
> tried single *and* double quotes). Sorry about that.
>
> Steve Pugh wrote:
>
>> Hi Daniel,
>>
>> I tried that to no avai
le & "')"
>
> but it generated the same erroneous string. Using the ascii-code
> equivalent (Chr(34) does the same.
>
> It's just soodd!!
>
> Daniel Clark wrote:
>
>>I think you want chr(39) (single quote).
--
MySQL General Mailing List
F
I think you want chr(39) (single quote).
> Every time I think I've got it, I am reminded thatI don't got it.
>
> Hello all, once again! Can anyone tell me why the following takes
> place? In my VB app I am adding records to the table "Jobs" with this
> code (trimmed way down - my actual INS
select * from navigation WHERE id = '".$category."' AND active='y'
AND order IS NOT null
ORDER BY order, title
> Hi. I had a MySQL DB set up and recently added a field 'order' to allow
> for
> exceptions in a web site menu heirarchy. Fields should be ordered by
> 'order'
> field first where it do
Yes it is a myth.
The records will come back in the same order IF there have been not
inserts and deletes. Depends on the database product to.
> 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 t
I used to program for a medical tester.
I used method 2:
2 - a table with 60 rows for one assessment :
results(#assessment_nr, labtest_nr, p, d) where p and d are my two
results.
The BIG advantage was changes to the tests, adding new ones, or deleting
fields. Made it much more flexible.
I think when adding the $ the number gets convert to a string. And then
the query orders it by alpha numberic.
> I'm having trouble with this query:
> SELECT
> CONCAT('$',ROUND(($varA*(establishments^2)+$varB*(establishments)+$varC),2))
> as price FROM table ORDER BY price
>
> A note first. The c
Think you want:
Select max(job_id)
from job_log_2004
> I'm trying to select the last record (row) in a db. I'm trying with a
> select:
> Select * from job_log_2004 where job_log_2004.JobID = (select
> max(job_log_2004.JobID) from job_log_2004) and it fails. The part about
> select max works an
Guess you could use the rand() function and look for a matching row id!?!
> Is it possible to randomly select from all entries in a table, but have it
> be 2 different ones each time? If so, what documentation should I be
> looking
> at?
>
> I am using PHP and MySQL together, if this helps.
>
> Th
Sounds to me like it doesn't the the alias name T2 but might need the full
table name.
> Hi,
>
> Can anyone give me a hint to what this error message is trying to say.
>
> Thanks,
>
> Justin Palmer
>
>
> -Original Message-
> From: Justin Palmer [mailto:[EMAIL PROTECTED]
> Sent: Thursday,
Sound like a great idea!
> Is there an easy way to create an HTML page that will copy selected tables
> to backup copies on the same server? I want to create an administration
> page for my client to be able to "backup" their database whenever they see
> fit. But, I can't give them direct access
You can ALTER TABLE
http://www.mysql.com/doc/en/ALTER_TABLE.html
> I´'m new with mysql and have following question:
>
> I have a table, that has a primary key with two columns and want to add a
> third column to this primary key.
>
> Is this possible and when yes: Do I have to delete all tables,
at was the way
> to go.
>
> I'll try this, though.
>
> Eric
>
> At 10:36 AM 2/25/2004 -0800, Daniel Clark wrote:
>>Do you have separate indexes on:
>>
>> Table1.ID
>> Table2.ID
>> Table1.Field1
>> Table2.Field1
>> Tabl
Do you have separate indexes on:
Table1.ID
Table2.ID
Table1.Field1
Table2.Field1
Table1.Field1
Table1.Field2
> Select*
> FROM Table1 as a
> INNER JOIN Table2 as b ON (a.ID = b.ID or (a.Field1 = b.Field1 and
> a.Field2 = b.Field2))
> WHERE bla bla bla
>
> We ha
> Hi, I have a table full of logged urls and ip addresses. The following
> query returns all the urls and the number of requests. How would I
> modify it to return unique requests based on distinct ip addresses?
>
> select url, count(*) as pageviews from table group by url order by
> pageviews desc
> select value from tableName where date in (select max(date) from
> tableName where id = 4);
>
> But, it doesn't work with mysql 4.0.
>
> Any ideas? Does anybody had this problem before?
What about:
SELECT value, date
FROM tablename
WHERE id = 4
ORDER BY date ASC
Just pick the first row.
I think I have stuffed up the installation of the MySQL thing. I am trying
to get it installed onto a Debian box and am not having alot of luck :o|
http://www.scanners.8m.com/config.html
Any help would be appreciated,
Cheers
Dan Clark
Information Systems
System Support
HealthCare Otago
5046
37 matches
Mail list logo