Max date in recordset

2006-11-14 Thread Vittorio Zuccalà

Hello,
i've a table with a lot of field and in particular: InsertDate,Box,Prt
Example:
InsertDate, Box, PRT
2006-11-01, BXT, 34
2006-11-01, TTS, 33
2006-11-01, RRT, 55
2006-11-02, BXT, 22
2006-11-02, TTS, 99
2006-11-02, SAR, 75


I'd like to find all record inserted in the last day...
In this example the last three records...
I do not know which is the last day before

Any suggestions?


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Mysql Web interface for normal Users

2006-11-07 Thread Vittorio Zuccalà

Anthony ha scritto:

for root access, i already have phpMyAdmin installed on the server.


You can also use phpmyadmin for normal user.
In my organization i use it for all users...


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Mysql Web interface for normal Users

2006-11-07 Thread Vittorio Zuccalà

Vittorio Zuccalà ha scritto:

You can also use phpmyadmin for normal user.
In my organization i use it for all users...



Uff...
I didn't remember...
If it is not enought you can use Dadabik (www.dadabik.org)

It is great: do not be impressed from its simple interface. It is very 
completed software :-)




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Last and Last-1

2006-11-02 Thread Vittorio Zuccalà

Hi,
i've a table in a mysql database.
It has a lot of field and three of them are:
* A counter: IDTable
* A date: DateFaxInsert
* A Number: NumberFaxInsert

I want to obtain the last and the last - 1 IDTable.

If i write:
SELECT MAX(IDTable) AS IDMax, DateFaxInsert, NumberFaxInsert FROM 
FaxServer GROUP BY DateFaxInsert


is ok but i would like to see MAX and MAX-1 of IDTable...


Any idea please?
Thanks :-)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

FROM_UNIXTIME(unix_timestamp)

2006-09-13 Thread Vittorio Zuccalà

|Hello,
i've a mysql table in which a webapplication, written in php, stores a 
lot of records...
One of the table's field is a date and the webapplication uses mktime() 
to store it as unix timestamp.


Now i'd like to use Microsoft Access to access to this table but i'd 
like to convert unix timestamp into human readable date.
Obviously Access doesn't have mysql *FROM_UNIXTIME(unix_timestamp)* 
function.


So: may someone know a reference to the function algorithm?
Or can someone tell me how can i use mysql functions into MSAccess?

Thank you in advance...
|



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Mysql privileges

2006-09-01 Thread Vittorio Zuccalà

Hello,
ok, you can tell me i'm a crazy boy...
I've made a lot of changes to privileges in a mysql server.

Then, i saw 2 root account: the first may be able to access from 
localhost, the second from all hosts.

Mysql server is inside our intranet so i decided to drop [EMAIL PROTECTED]
Now we have a lot of problem.
I made a lot of things when i understood that it was not a good idea and 
actual situation is this:

* now i can access with [EMAIL PROTECTED] but i can't create databases
* now i can't access with [EMAIL PROTECTED] or [EMAIL PROTECTED]

How can i interpret this situation?
How can i access to mysql server from other hosts?
How can i create db as root?

Thank you for answers!



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

problem on a trigger

2006-08-16 Thread Vittorio Zuccalà

Hello,
i'm new about triggers...
I'm trying to create one trigger: it may insert into a column the user 
that insert the record...


my table-
CREATE TABLE `test`.`t2` (
 `s1` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
 `utente` VARCHAR(80) NOT NULL DEFAULT '',
 PRIMARY KEY(`s1`)
)
ENGINE = InnoDB;

then my trigger-
create trigger inserisci_t
after insert on t2
for each row
update t2 set utente= current_user where s1= NEW.s1;

When i try to insert:-
insert into t2(s1) values (8);

it responds:-
Can't update table 't2' in stored function/trigger because it is 
already used by statement which invoked this function/trigger.


Any suggestion about my trigger?
Thank you in advance!


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

manual on stored procedures and triggers

2006-08-09 Thread Vittorio Zuccalà

Hello,
i'm searching for a manual about stored procedures and triggers.
I'm new about this arguments but i want to study them.
Unfortunally, mysql online manual is not rich about examples so, can you 
suggest me

some online manuals on stored procedures and triggers?

Thank you,
   Vittorio


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

version of mysql

2006-08-03 Thread Vittorio Zuccalà

Hello,
i'm installing an open source program based on mysql because i want to 
try it.

It controls mysql's version and it wants 4.1.16 but i've 4.1.11...

Is it possible telling to mysql server to give a different number of its 
version?


In other words: is there some configuration that let me to specify a 
different

version of mysql without install a newer version?

I hope i was clear...

Thanks in advance for your answers

--
vittorio zuccalà
Finconsumo Banca SPA
[EMAIL PROTECTED]
Tel: 011-6319464



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

MysqlCC

2006-07-20 Thread Vittorio Zuccalà

Hi,
i used MysqlCC for a long time with mysql 4.0 on my remote server...
Now i've installed mysql 5.0 on my PC and i'd like to use MysqlCC but it 
doesn't work.

It responds:
[localhost] ERROR 1251: Client does not support authentication protocol 
requested by server; consider upgrading MySQL client


You have something similar about mysql client last week but what about 
MysqlCC?


Thanks for your answers...
   Vittorio


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Access violation in QueryBrowser

2006-07-20 Thread Vittorio Zuccalà

Ok, MysqlCC is deprecated.
I do not like this decision but... it is the thruth...
I'm trying MysqlBrowser.
It start connection with my server but it writes in the status bar:
Access violation at address 005BC7B4 in module 'MySQLQueryBrowser.exe' 
Readof address 0


What does it means?
It takes 98% of CPU time!!

Thanks,
   Vittorio

PS: WinXP Professional ans also server runs on the same PC on version 5.0


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

queue select

2006-07-10 Thread Vittorio Zuccalà
Hello,
i've two tables and they have the same field.
I'd like to make a select which take records in a table and after it
shows record in the other table
in the same field...

I try to explain:

Table1
FieldA - FieldB
AAA123 - Cellular
BBB111 - PostIt

Table2
FieldA - FieldH
AAB111 - Dido
BGF145 - Serp

My select has to show:
AAA123
BBB111
AAB111
BGF145

Is there a way for it?
Thanks!!

-- 
vittorio zuccalà
Finconsumo Banca SPA
[EMAIL PROTECTED]
Tel: 011-6319464



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: remote monitoring of mySQL

2006-07-07 Thread Vittorio Zuccalà
Andy Ford ha scritto:
 Can I do it with DBD::Perl
   

DBD::Mysql is a good module and you can control mysql status...
You can do a lot of select and you can send them functions as createdb,
shutdown or reload.
I use this module in my mysql databases (i've only one server not many
as you have...) and i'm very
happy about it.




-- 
vittorio zuccalà
Finconsumo Banca SPA
[EMAIL PROTECTED]
Tel: 011-6319464



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Join in two different database

2006-07-07 Thread Vittorio Zuccalà
Hello,
mysql 4.1.11 on debian.

I've db1 with table1 and db2 with table2.
How can i make a join into table1 and table2?

If each table are into the same db i can write:
select a.campo1, b.campo2 FROM table1 a INNER JOIN table2 b ON
a.campo1=b.campo2;

But what about my problem?

Thank you very much!!


-- 
vittorio zuccalà
Finconsumo Banca SPA
[EMAIL PROTECTED]
Tel: 011-6319464



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: a tricky join

2006-06-21 Thread Vittorio Zuccalà
Helen M Hudson ha scritto:
 So, if my table structure was:
 id | date   | order_ref | amount
 1  | 1/1/01 | 100   | 1000  these 2 are the rows
 2  | 1/1/01 | 100   | 200   i want to exclude
 3  | 2/1/01 | 100   | 1000
 4  | 2/1/01 | 100   | 200
 5  | 2/1/01 | 100   | 50

 I'd like to end up with
 latest_date_on_order | order_ref | sum(amount)
 2/1/01   | 100   | 1250

 I know its a one-liner for someone who has reached the light... so any help 
 very much appreciated!
   


I do not know if i can give you the light because my english is not as
good as I'd like.
If i've understood your question, you can try this SQL statement:

SELECT max( `date` ) AS 'date', sum( `amount` ) AS 'amount'
FROM `Prova`
WHERE `order` =100
GROUP BY `order`
LIMIT 0 , 30


Enjoy and please tell me if it solves your problem...

-- 
vittorio zuccalà
Finconsumo Banca SPA
[EMAIL PROTECTED]
Tel: 011-6319464



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]