Re: max() can't work

2010-02-06 Thread armando
the field "movid" is type integer or varchar ?


2010/2/6 tech list 

> select * from table_name where movid = max(movid);
>
> why the sql above can't work?
> Shall I use a sub-select instead?
>
> select * from table_name where movid = (select max(movid) from table_name)
> ?
>
>
> Thanks in advance.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=armand...@gmail.com
>
>


-- 

ing. paredes aguilar, armando
http://www.sinapsisperu.com/
Desarrollador


Consult with group

2009-11-28 Thread armando
i have a question, i'm searching for a while and do not find some reference
how to do that.

a simple query return this:

dato1 dato2 dato3 estado1 fecha1
dato1 dato2 dato3 estado2 fecha2
dato1 dato2 dato3 estado3 fecha3
dato4 dato5 dato6 estado1 fecha4
dato4 dato5 dato6 estado2 fecha5
dato4 dato5 dato6 estado3 fecha6


and i need this:

dato1 dato2 dato3 fecha1 fecha2 fecha3
dato4 dato5 dato6 fecha4 fecha5 fecha6


any help?, and i'm sorry por my english.

thanks!

-- 

ing. paredes aguilar, armando
http://www.sinapsisperu.com/
Desarrollador


Re: Security Question

2005-10-03 Thread Armando
If it's a DoS attack then perhaps you should be speaking to your ISP and 
getting that resolved rather than trying to work around the problem on 
your side of things!


Having said that, you could possibly impose host level restrictions in 
MySQL, but that could be a lot of work to modify your existing user 
base, especially since you'd need to gather all your remote host 
information first, and then do all the updates. Cheers.


Armando

J.R. Bullington wrote:

Hi All --

I have been a member of this list for a while but I actually have a 
question that I can't answer.


MySQL v4.1.14-nt on Win2k3 Server

I've got someone who is trying to get in, but I have locked it down. 
Methods used include, but are not limited to:


No Outside Root Access
System DSNs for Web connectivity
Strong Passwords for each user
User Permissions different for each purpose


Here's the question -- It's a DoS attack and it's locking up the system 
for other users (max_connections_allowed).


Anything I can do extra via MySQL that will keep this person away, or 
perhaps free up the server? I would rather not increase the 
max_conn_allowed var as it's already at 800 (more than I need).


Do not have access to the Router (I wish I did, ACLs are such a great 
thing), but have full Admin rights to the server.


Thanks everyone!

J.R.



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



RE: ASP Connection to Mysql fails

2004-08-17 Thread Armando
Paul,

Interesting: I just tested your DSN-Less connection info. (including
port 3307) from my web server to another machine running mysql and it
connected fine - but only the first time. I used the IP address for my
SERVER variable. Then I changed it to the FQDN and it failed with the
same message you're getting. I tried setting up an entry in my hosts
file to specify the FQDN of the remote machine along with its associated
IP address and it still fails. Then I changed the SERVER variable back
to the IP address, and now it won't connect at all again.

Restart the MySQL service on the db machine, fails. Restart WWW service
on webserver, fails. Restart IIS Admin on webserver, fails!

Try from the ODBC administrator on the webserver using both IP and FQDN,
connects every time no problem, DSN-less connection refuses to work at
all.

I'm going to dig into this a bit tomorrow with a few people at work and
see what I can come up with and will let you know. This is starting to
bug me too...

Armando

-Original Message-
From: Paul Stearns [mailto:[EMAIL PROTECTED] 
Sent: August 15, 2004 11:51 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: ASP Connection to Mysql fails


Armando:

I tried the fully qualified domain name 'computer.domain.root', I also
tried the IP address. Both worked on the odbc test, but not on the
connect string.

I have already gone the DSN route and it works, but it bugs me that the
DSNless method doesn't work.

My current hypothesis is that the odbc driver is confusing (or
ignoring)either the ip address or port # for the local mysql DB with
what I want for the remote.

Paul


-----Original Message-
From: Armando [EMAIL PROTECTED];]
Sent: 8/15/2004 11:35:44 PM
To: [EMAIL PROTECTED]
Subject: RE: ASP Connection to Mysql fails

Paul, when you say SERVER=myserver.com, are you specifying the FQDN
name? ie; thatcomputer.thatdomain.com

I know you mentioned you use the same settings in your ASP script as you
did in the ODBC data source test but if you didn't specify the FQDN, try
it and see what happens.

Failing that, try setting up a System DSN in your ODBC Data Sources
(since you said you could connect that way) and once the DSN is setup,
try setting your ASP connection string to connect to the remote server
using the DSN name rather than a DSN-less connection string and see what
happens there as well. Cheers.

Armando

-Original Message-
From: Paul Stearns [mailto:[EMAIL PROTECTED] 
Sent: August 15, 2004 4:39 PM
To: [EMAIL PROTECTED]
Subject: ASP Connection to Mysql fails


I have an ASP application running on a server with a mysql DB,
everything works great. I connect using localhost, no problems.

I have a second mysql DB on another server. I connect to it via the odbc
Data Source Administrator from the web server with no problems.

When I try to connect from an ASP script from the web server using the
following;

=
Set connMailServer = Server.CreateObject("ADODB.Connection")

ConnectString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=myserver.com;
USER=root; PASSWORD=rootPW; DATABASE=myDB; PORT:3307; OPTION=35;"

IntDebug=connMailServer.Open(ConnectString)
=

The server, user, password, database and port are what I used in the
odbc Data Source Administrator. Remember I can connect to my local DB
from ASP.

I receive the following error;

==

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'myserver.com'
(10061)

=

The environment is w2k server on both computers. The MYSql version on
remote server is 4.0.17.

I'm so confused...

Paul

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


-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
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]



Re: Help!

2001-09-18 Thread Armando Cerna

Thanks so much to everyone who replied I got it working perfectly you guys 
rule!

Armando

On Tuesday 18 September 2001 09:56 am, you wrote:
> > I try the following command, and get that error every time:
> >
> >
> > mysql> select company, tele, contact, mariacust.comments
> > ->  from
> > -> customers where tele = mariacust.tele GROUP BY company;
> > ERROR 1109: Unknown table 'mariacust' in field list
> > mysql>
> >
> >
> > I don't quite understand why this happens since everything exists
> >
> > Armando
>
> Everything may exist, but you didn't reference mariacust in your _from_
> statement.
>
> select customers.company, customers.tele, customers.contact,
> mariacust.comments
> from
> customers, mariacust
> where custmers.tele = mariacust.tele
> GROUP BY customers.company;
>
> Or something like that...
>
> Jay Fesco
>
> Magical Mystery Words: database,sql,query,table
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Help!

2001-09-18 Thread Armando Cerna

I try the following command, and get that error every time:


mysql> select company, tele, contact, mariacust.comments 
->  from
-> customers where tele = mariacust.tele GROUP BY company;
ERROR 1109: Unknown table 'mariacust' in field list
mysql> 


And yes... the talbe exists.

mysql> show tables;
+-+
| Tables_in_maria |
+-+
| cathycust   |
| customers   |
| inventory   |
| invoices|
| mariacust   |
| salesid |
+-+
6 rows in set (0.00 sec)

I don't quite understand why this happens since everything exists

Armando

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Overwrite only if it exists HELP please!

2001-09-17 Thread Armando Cerna

I understand everything you said except primary key do i need one I have seen 
it before in some fields but have no clue what it is... thanks btw =)

Armando

On Monday 17 September 2001 05:44 pm, you wrote:
> At 5:34 PM -0700 9/17/01, Armando Cerna wrote:
> >I need to insert a phone number into a table.  I would do this with the
> >insert command except I think that it would create duplicate entries even
> >though they are exactly the same is there a  way that I can have it not
> > enter the data if it exists already
>
> INSERT IGNORE
>
> will ignore the new record if it duplicates an existing record on
> a primary key value.
>
> It's in the manual:
> http://www.mysql.com/doc/I/N/INSERT.html
>
> >TIA
> >Armando
> >
> >-
> >Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> >To request this thread, e-mail <[EMAIL PROTECTED]>
> >To unsubscribe, e-mail <[EMAIL PROTECTED]>
> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Overwrite only if it exists HELP please!

2001-09-17 Thread Armando Cerna

I need to insert a phone number into a table.  I would do this with the 
insert command except I think that it would create duplicate entries even 
though they are exactly the same is there a  way that I can have it not enter 
the data if it exists already 

TIA
Armando

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Updating Customer table

2001-09-09 Thread Armando Cerna

Hi I am trying to update a table that is full of customer ID's using another 
table with the following command

 update customers set row_id=mc.id where tele=mc.tele;

But it give me the error

ERROR 1109: Unknown table 'mc' in where clause


The table mc does exist I am pretty lost on this one any help would be  great

Armando

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Adding Customer ID numbers to and already existing table

2001-08-29 Thread Armando Cerna

How would I add customer id numbers which start at 1000 to an already 
existing table.  I need these numbers to auto_increment.  Any help would be 
great

Armando

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Changing auto_increment field in mysql to start at 1000

2001-08-29 Thread Armando Cerna


I tried this:

update customers set row_id='1000' where row_id='1';

but that only changed the one field in the table and the other ones stayed 
the same =(.  
Could someone please tell me the correct way to do this

Armando


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




dbf2mysql problem please help

2001-08-28 Thread Armando Cerna

I have problems only converting certain DBF files to mysql with dbf2mysql.  
Some work but some don't and when they dont' I get the following error

bash-2.05$ dbf2mysql -d maria -t cusine -c -P pass -U user CUSINE.DBF 
Error creating table!
Detailed report: You have an error in your SQL syntax near 'DESC varchar(20) 
not null)
' at line 2

I have no clue why this happens if anyone could help it would be great thanks


Armando

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Overwriting records with matching fields with dbf2mysql

2001-08-27 Thread Armando Cerna

What would be the best way to do this because I am working on a mysql 
replacement to an old foxpro database and I can import the table once but I 
am worried that if I try to import it again it will make duplicate records.  
Another issue is that I have added an extra field to the table which is not 
in the original table but I would like to keep it preserved some how.  Any 
help would be great.

Armando

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




mysql-server.sh gone in freebsd

2001-08-23 Thread Armando Cerna

HI  installed the mysql-server port in freebsd and the 
/usr/local/etc/rc.d/mysql-server.sh file just disapeared its done this before 
and I fixed it by reinstalling I think but I would like to avoid this.  Does 
anyone know anything about this?

Armando


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Installing multiple versions of mysql

2001-08-06 Thread Armando Colpa

I am currently trying to install mysql on a linux
machine that already has mysql running. I went into
the safe_mysqld script and modified the tcp port to
point to 3308 and the mysql.sock file to point to
/tmp/tmp/mysql.sock. I was able to get this to work
with one of the newer versions of mysql 3.23.40, by
doing the above and using the following config
command:

./configure \
--with-tcp-port=3308\

--with-unix-socket-path=/tmp/tmp/mysql.sock\
 --prefix=/usr/mysql

The funny thing is, a message pops up saying that I
didn't need to configure the version I had.  However,
safe_mysqld wasn't working otherwise.  Anyway, I
couldn't use this version of mysql with a php build
procedure I was using, so I used an older mysql
version 3.22.32. Any time I try the above (and I use a
different port number even from the one above, which I
deleted and killed anyway), the final message always
states (mysqld daemon ended). Any clues would be
greatly appreciated.  Thanks in advance.

Armando

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Converting an old Foxpro dos database to mysql/php

2001-07-30 Thread Armando Cerna

Do you happen to have a url on how to do this especially the foxpro
portion I don't know to much about it


On Mon, 30 Jul 2001, Christopher R. Jones wrote:

> The simplest thing to do is to run the foxpro database and export the
> records to a text file.  Run the SHOW STRUCTURE command to list the table
> structures and then set up a new mysql database that mimics the foxpro
> table structure.
>
>
> >I have an old database that is running on foxpro that is used for sales
> >and order entry at my work and I was wondering how I would go about
> >porting it to a *nix enviorment.  The first step is the port the dbf files
> >I think so I grabbed a copy of dbf2mysql and tried messing around with it
> >and when I do I get an error like this:
> >
> >bash-2.05$ dbf2mysql CAT.DBF
> >Table does not exist!
> >
> >What I would eventually like to do Is have mysql installed on a freebsd
> >box at work and then have all the workstations that run windows be able to
> >enter invoices from netscape or internet explorer over the lan.  I would
> >love if someone could point me in the right direction on where to get
> >started and some interesting websites to read about this.  I am a newbie
> >with all this database stuff.  Please CC a reply to my email address
> >[EMAIL PROTECTED] because I do not subscribe to the mailing list.
> >Thanks in advance for all your help
> >
> >Armando
> >
> >
> >
> >-
> >Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> >To request this thread, e-mail <[EMAIL PROTECTED]>
> >To unsubscribe, e-mail <[EMAIL PROTECTED]>
> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
> Christopher R. Jones, P.Eng.
> 14 Oneida Avenue
> Toronto, Ontario M5J 2E3
> Tel. 416 203-7465
> Fax. 416 203-8249
> Email [EMAIL PROTECTED]
>
>
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Converting an old Foxpro dos database to mysql/php

2001-07-30 Thread Armando Cerna

I have an old database that is running on foxpro that is used for sales
and order entry at my work and I was wondering how I would go about
porting it to a *nix enviorment.  The first step is the port the dbf files
I think so I grabbed a copy of dbf2mysql and tried messing around with it
and when I do I get an error like this:

bash-2.05$ dbf2mysql CAT.DBF
Table does not exist!

What I would eventually like to do Is have mysql installed on a freebsd
box at work and then have all the workstations that run windows be able to
enter invoices from netscape or internet explorer over the lan.  I would
love if someone could point me in the right direction on where to get
started and some interesting websites to read about this.  I am a newbie
with all this database stuff.  Please CC a reply to my email address
[EMAIL PROTECTED] because I do not subscribe to the mailing list.
Thanks in advance for all your help

Armando



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php