Re: select unique ?

2008-02-14 Thread peter lovatt
SELECT DISTINCT Colour
FROM tablename

Peter





On 14/02/2008, Richard <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I don't know if it is possible to do this with mysql alone ...
> Here goes :
> I've got a database list which is like to following :
>
> Num |   Name|   Colour
> ---
> 1   |   Harry   |   Red
> 2   |   Tom |   Blue
> 3   |   Jane|   Green
> 4   |   Philip  |   Red
> 5   |   Sarah   |   Red
> 6   |   Robert  |   Blue
>
>
> And from this table I wish to get a list of used colours.
>
> The correct answer would be :
>
> Colour
> -
> Red
> Blue
> Green
>
> The answer I don't want :
>
> Colour
> 
> Red
> Blue
> Green
> Red
> Red
> Blue
>
> How would I achieve the first result with mysql ? Is it possible?
>
>
> Thanks in advance,
>
> Richard
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>


Re: Safe DB Distribution

2007-01-30 Thread peter lovatt

Hi

You probably cant make it 100% secure, because php is not a fully compiled
language, and as such an expert techie could probably add extra code to your
app that wouild allow access to the database, BUT you can get pretty close.

You will need to encrypt everything in the database using MySql encryption
functions

http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html

This will mean you can only access the data using the password it was
encrypted with. This will stop anyone installing the database accessing the
data using another MySql client.

Next you need to encrypt the php so that the user cannot get the encryption
password. There are a couple of options I can think of, there are probably
more. The first is Zend Accelerator ( http://www.zend.com) , which I think
compiles the php (check this though). The second is ioncube (
http://www.ioncube.com/) which is intended to prevent unauthorised access to
php code.

As above, your app needs MySql, and is not open source so you need a mysql
licence.

Hope this helps

Peter


On 30 Jan 2007 09:08:38 -, Felix Geerinckx <[EMAIL PROTECTED]>
wrote:


[EMAIL PROTECTED] ("Suhas Pharkute") wrote in
news:[EMAIL PROTECTED]:

> I want to distribute the MySQL DB to different user with an PHP web
> app.

Make sure you have read and understood the MySQL licensing policy, if your
app is not open source (as it seems to be).

> My biggest problem is MySQL data files. Is there anyway by which
> I can configure the MySQL so that only PHP script can read it and if
> you happen to copy the Data files and try to use it, that will be
> useless.

No.

--
felix

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




Re: MySql Limitations??

2006-05-29 Thread peter lovatt

Hi

We have tables of 1.5M rows 25 fields, in heavy use with frequent inserts
and updates on a P4 with 1GB of RAM. Performance is fine, and the table size
is 400MB, so you should not have any problems.

Peter


On 29/05/06, Chris W <[EMAIL PROTECTED]> wrote:


Harish TM wrote:

> hi...
>   I need to store something like a couple of million rows is a MySql
> table. Is that ok or do I have to split them up. I intend to index
> each of
> the columns that I will need to access so as to speed up access.
> Insertion
> will be done only when there is very little or no load on the server and
> time for this is not really a factor. I also do not have any
> constraints on
> disk space.  Please let me know if I can just use MySql as it is
> or if I
> need to make some changes

I have a table with around 900,000 rows and I know others have tables
with many millions of rows, I think I read some even have tables with
billions or rows.  The limitation you hit is generally because of your
OS.  Most OSs have an upper limit on file size.  Since a table is stored
in a file, that file size limitation of the OS is what generally limits
the table size.  In which case the number of rows depends on the size of
the rows.


--
Chris W
KE5GIX

Gift Giving Made Easy
Get the gifts you want &
give the gifts they want
One stop wish list for any gift,
from anywhere, for any occasion!
http://thewishzone.com


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




RE: Access denied for user - I cant work this out

2005-01-26 Thread Peter Lovatt
Hi

If this is verbatim code the connection string is inside the function and
the connection parameters are  outside, so they will not be available to the
mysql_connect()

Try



 function db_connect()
{
   //Database Settings
 $db_host = 'localhost'; //database hostname
 $db_name = 'powerpla_powerplay'; //database name
 $db_user = 'root'; //database USER name
 $db_pass = 'rootpass'; // database password


if ($dbc = @mysql_connect($db_host,
$db_user, $db_pass)) {
if
(!mysql_select_db($db_name)) {

die('Could not connect to the database because: ' . mysql_error() .
'');
}
} else {

die('Could not connect to the database because: ' . mysql_error() .
'');
}
}

HTH
Peter







> -Original Message-
> From: Christian Biggins [mailto:[EMAIL PROTECTED]
> Sent: 26 January 2005 13:30
> To: 'Peter Lovatt'; mysql@lists.mysql.com
> Subject: RE: Access denied for user - I cant work this out
>
>
> Hi Peter,
>
> There is a password being suppled - see code (btw, its local testing only,
> hence the root user)
>
>//Database Settings
>  $db_host = 'localhost'; //database hostname
>  $db_name = 'powerpla_powerplay'; //database name
>  $db_user = 'root'; //database USER name
>  $db_pass = 'rootpass'; // database password
>
>  function db_connect()
> {
>   if ($dbc = @mysql_connect($db_host,
> $db_user, $db_pass)) {
>   if
> (!mysql_select_db($db_name)) {
>
> die('Could not connect to the database because: ' . mysql_error() .
> '');
>       }
>   } else {
>
> die('Could not connect to the database because: ' . mysql_error() .
> '');
>   }
> }
>
>
>
> -Original Message-
> From: Peter Lovatt [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 27 January 2005 12:27 AM
> To: Christian Biggins; mysql@lists.mysql.com
> Subject: RE: Access denied for user - I cant work this out
>
> hi
>
> you are not passing a password to mysql - check your code to see
> if this is
> correct.
>
> Peter
>
> > -Original Message-
> > From: Christian Biggins [mailto:[EMAIL PROTECTED]
> > Sent: 26 January 2005 12:27
> > To: mysql@lists.mysql.com
> > Subject: Access denied for user - I cant work this out
> >
> >
> > Hi All,
> >
> > I am consistently getting;
> >
> > Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)
> >
> > I am connecting through php with the same script I use all the time, I
> > have checked it and dbl checked it for problems.
> >
> > I can connect to mysql in a prompt and I have added new users with all
> > priv's and connected with them - obviously its more a server issue
> > than mysql (I think)...
> >
> > MySQL version is 4.0.21
> > PHP Version 4.3.8
> > On a Win2k server using apache 2 (just a local testing server).
> >
> > Any info would be muchly appreciated.
> >
> > Christian
> >
> >
> > --
> > MySQL General Mailing List
> > For 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]
>



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



RE: Access denied for user - I cant work this out

2005-01-26 Thread Peter Lovatt
hi

you are not passing a password to mysql - check your code to see if this is
correct.

Peter

> -Original Message-
> From: Christian Biggins [mailto:[EMAIL PROTECTED]
> Sent: 26 January 2005 12:27
> To: mysql@lists.mysql.com
> Subject: Access denied for user - I cant work this out
>
>
> Hi All,
>
> I am consistently getting;
>
> Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)
>
> I am connecting through php with the same script I use all the
> time, I have
> checked it and dbl checked it for problems.
>
> I can connect to mysql in a prompt and I have added new users with all
> priv's and connected with them - obviously its more a server issue than
> mysql (I think)...
>
> MySQL version is 4.0.21
> PHP Version 4.3.8
> On a Win2k server using apache 2 (just a local testing server).
>
> Any info would be muchly appreciated.
>
> Christian
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Max connections being used every 10-12 day.

2005-01-01 Thread Peter Lovatt
Hi

there a are a couple of things that I have found cause occasional lock ups.

running out of temp space - MySql builds temp files on bigger queries and if
it runs out of temp disk space it grinds to a halt, which causes all the
following queries to queue up until max_connections is exceeded.

the second cause is one massive query - big tables, lots of joins etc - that
takes so much processing power that there is nothing left. MySql and perhaps
the server slows down to the point that it cannot process any more queries,
and again the queue builds until max_connections is exceeded.

if the lockup occurs overnight this might be the time the server is doing
housekeeping - apache log analysis for example - so it may be the server is
loaded too heavily to manage MySql queries too, so again the queue builds
up.

Just a few thoughts - hope it helps.

Peter




> -Original Message-
> From: Fredrik Carlsson [mailto:[EMAIL PROTECTED]
> Sent: 01 January 2005 10:37
> To: mysql@lists.mysql.com
> Subject: Max connections being used every 10-12 day.
>
>
> Hi list,
>
> I have a rather serious problem that i really dont know how to solve,
>
> Every 8-12 day my mysql server stops responding and i get the error code
> that indicates that max_connections are full, the problem is that i have
> checked all of
> my code over and over again to se that every connections are closed
> properly and they are. No persistent connections are being used and the
> max connections error allways occures at night 02:00->03:00, my httpd
> logs shows no unnormal amount of traffic at the time.
>
> The last time this happend i tuned the wait_timeout down to 15 seconds
> to se if that helped, but no effect :(
>
> The server is running NetBSD 1.6.2 and mysql 4.0.21
>
> I really need help on this one because i dont know what is causing
> max_connections to be used all at once or how to reproduce the error, i
> only know that it happens very periodicly and 'show full processlist'
> hardly ever shows any connections not even the day/hours before the
> error. The server has about 4-5 queries / seconds.
>
> According to the manual the max_connections have one connection reserved
> for the superuser but i have never been able to use that extra
> connection to se which user that is eating upp all the connections.
>
>
> // Fredrik Carlsson
>
> 
> # The MySQL server
> [mysqld]
> port= 3306
> socket= /tmp/mysql.sock
> skip-locking
> key_buffer = 280M
> max_allowed_packet = 32M
> table_cache = 512
> sort_buffer_size = 2M
> read_buffer_size = 2M
> myisam_sort_buffer_size = 64M
> thread_cache = 8
> query_cache_size = 64M
> # Try number of CPU's*2 for thread_concurrency
> thread_concurrency = 8
> max_connections = 200
> wait_timeout = 15
> connect_timeout = 5
>
> [mysqldump]
> quick
> max_allowed_packet = 16M
>
> [mysql]
> no-auto-rehash
> # Remove the next comment character if you are not familiar with SQL
> #safe-updates
>
> [isamchk]
> key_buffer = 256M
> sort_buffer_size = 256M
> read_buffer = 2M
> write_buffer = 2M
>
> [myisamchk]
> key_buffer = 256M
> sort_buffer_size = 256M
> read_buffer = 2M
> write_buffer = 2M
>
> [mysqlhotcopy]
> interactive-timeout
>
>
>
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Auto-Increment Starting Point? (Multimaster Replication Question)

2004-11-18 Thread Peter Lovatt
5001

Peter

> -Original Message-
> From: Robinson, Eric [mailto:[EMAIL PROTECTED]
> Sent: 18 November 2004 21:35
> To: [EMAIL PROTECTED]
> Subject: Auto-Increment Starting Point? (Multimaster Replication
> Question)
> 
> 
> When you set a field to auto-increment, can you tell it where to start?
> 
>  
> 
> I'm trying to set up multimaster replication, but I'm worried about
> auto-increment collisions. 
> 
>  
> 
> Q: If server A starts auto-incrementing at 0, and server B starts
> auto-incrementing at some point higher than the maximum number of
> records, would that allow replication without auto-increment collisions?
> 
>  
> 
> Q2: Assuming you can tell it where to start auto-incrementing, what
> happens after the following sequence:
> 
>  
> 
> 1. Johnny inserts record 1000 at server A.
> 
> 2. Server A receives record number 5000 from server B via replication.
> 
> 3. Mary needs to insert a new record. Does server A number the new
> record 1001 or 5001?
> 
>  
> 
> --
> 
> Eric Robinson
> 
>  
> 
> 


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



RE: Row level security requirements, can I still use MySQL?

2004-11-18 Thread Peter Lovatt
Hi

yes that is a loophole

you could encrypt the passwords using a password held in the software

so


 SELECT  DECODE(g.datapasword ,"system pass supplied by software")
 FROM `User` u, `Groups` g, `Groups_user_link` l
 WHERE
 u.userID = "users ID here"
 AND u.userID = l.userID
 AND  l.groupID = g.groupID

someone with root access to the database and access to the software
sourcecode would still be able to gain access, but it is an extra layer of
security.

Peter





> -Original Message-
> From: Jonas Ladenfors [mailto:[EMAIL PROTECTED]
> Sent: 18 November 2004 12:36
> To: 'Peter Lovatt'
> Subject: RE: Row level security requirements, can I still use MySQL?
>
>
> Ok, This is a nice solution but it still lacks a thing I would like to
> avoid. Any user with "global" access  for example root would have
> access to
> the groups table and could easily se which password was allocated to each
> group and in that way bypass the security system? Or have I misunderstod
> your solution.
>
> In any case, thanks alot for wasting som "brain-time" on this ;)
>
> Regards
> /Jonas
>
> -Original Message-
> From: Peter Lovatt [mailto:[EMAIL PROTECTED]
> Sent: den 18 november 2004 12:13
> To: Jonas Ladenfors
> Subject: RE: Row level security requirements, can I still use MySQL?
>
>
> The groups system would work in software
>
> I would suggest
>
> in mysql
>
> create tables
>
> `User`
> userID
> username
> password
>
>
> `Groups`
> groupID
> data_password
>
>
> `Groups_user_link`
>
> userID
> groupID
>
> In software
>
> log user in
> select data (group) to view
>
> SELECT  g.datapasword
> FROM `User` u, `Groups` g, `Groups_user_link` l
> WHERE
> u.userID = "users ID here"
> AND u.userID = l.userID
> AND  l.groupID = g.groupID
>
> which will return the password for the data group
>
> the software will then retrieve the data using the password
>
> HTH
>
> Peter
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> > -Original Message-
> > From: Jonas Ladenfors [mailto:[EMAIL PROTECTED]
> > Sent: 18 November 2004 10:46
> > To: 'Peter Lovatt'; [EMAIL PROTECTED]
> > Subject: RE: Row level security requirements, can I still use MySQL?
> >
> >
> > Ok, jupp if I could use groups each group could have a shared
> key. How do
> > you create groups and then add users to them in MySQL? Are you
> refering to
> > the Linux systems user and groups? This idea should work but I am not
> > familiar with how groups work in mysql. I need to be able to
> > audit logs on a
> > per user level, is this possible in this solution?
> >
> > /Jonas
> >
> > Hi
> >
> > I use a system based on linux securuty model
> >
> > create groups - this will define access to the data, so you
> need to group
> > the data - and encrypt data the group can access using the password
> > belonging to that group.
> >
> > make users members of any number of groups, as required.
> >
> > Users can then access any data they are untitled to, but
> cannot read data
> > encrytped with a password they do not have access to.
> >
> > You will need to use  software (php, C++, asp, whatever) to manage the
> > user/group system.
> >
> >
> > HTH
> >
> > Peter
> >
> >
> >
> >
> > > -Original Message-
> > > From: Jonas Ladenfors [mailto:[EMAIL PROTECTED]
> > > Sent: 18 November 2004 10:19
> > > To: 'Peter Lovatt'; 'Mysql (E-mail)'
> > > Subject: RE: Row level security requirements, can I still use MySQL?
> > >
> > >
> > > Yeah you are correct locking is something else I actually meant was
> > > restricted access.
> > >
> > > If I understand you correctly I would then encrypt all
> > information in the
> > > table I was interested in restricting access to. But if two or
> > more users
> > > was to share a row in the table they would need a shared key? and then
> > > several user collaborations would result in a lot of different
> > > keys. I have
> > > actually been thinking about this solution earlier, my problem
> > with it is
> > > where to store the different keys that are needed. Forcing the user to
> > > manually keep track of 5 - 10 keys is to much to hope for sadly;)
> > >
> > > What I have been thinking about is some low-level way where you as an
> > > administrator can contr

RE: Row level security requirements, can I still use MySQL?

2004-11-18 Thread Peter Lovatt
Hi

I use a system based on linux securuty model

create groups - this will define access to the data, so you need to group
the data - and encrypt data the group can access using the password
belonging to that group.

make users members of any number of groups, as required.

Users can then access any data they are untitled to, but  cannot read data
encrytped with a password they do not have access to.

You will need to use  software (php, C++, asp, whatever) to manage the
user/group system.


HTH

Peter




> -Original Message-
> From: Jonas Ladenfors [mailto:[EMAIL PROTECTED]
> Sent: 18 November 2004 10:19
> To: 'Peter Lovatt'; 'Mysql (E-mail)'
> Subject: RE: Row level security requirements, can I still use MySQL?
>
>
> Yeah you are correct locking is something else I actually meant was
> restricted access.
>
> If I understand you correctly I would then encrypt all information in the
> table I was interested in restricting access to. But if two or more users
> was to share a row in the table they would need a shared key? and then
> several user collaborations would result in a lot of different
> keys. I have
> actually been thinking about this solution earlier, my problem with it is
> where to store the different keys that are needed. Forcing the user to
> manually keep track of 5 - 10 keys is to much to hope for sadly;)
>
> What I have been thinking about is some low-level way where you as an
> administrator can control users and groups and place restrictions on each
> row by tagging the row in some way? Or the user could tag his rows in
> someway.
>
> Is this how other RDBMS enforce access restrictions?
>
> Regards
> /Jonas
>
> -Original Message-
> From: Peter Lovatt [mailto:[EMAIL PROTECTED]
> Sent: den 18 november 2004 11:03
> To: Jonas Ladenfors; Mysql (E-mail)
> Subject: RE: Row level security requirements, can I still use MySQL?
>
>
> Hi
>
> What about encrypting the data using a password that is specific to the
> user. That way only those that know the password for that row can
> access it.
>
> Locking is really to stop two users editing the same record at the same
> time, rather than controlling access.
>
> HTH
>
> Peter
>
>
>
> > -Original Message-
> > From: Jonas Ladenfors [mailto:[EMAIL PROTECTED]
> > Sent: 18 November 2004 09:46
> > To: Mysql (E-mail)
> > Subject: Row level security requirements, can I still use MySQL?
> >
> >
> > Hello, I am in the position where I need row level user access, this is
> > crucial in my current project. I know this has been discussed
> > before and the
> > answer has been "use views when they become availble". But views
> > would still
> > allow the "root" user access to the complete table, wouldnt it? I
> > would like
> > to lock rows to certain user and not let anyone else see them,
> > not even the
> > root user.
> >
> > I have been thinking about using heap tables or trying to supply each
> > user/group with their own dynamically created tables. But I
> always come to
> > the conclusion that I am hacking away at something I do not fully
> > understand
> > and that I cannot guaranty that the end result will have the security I
> > claim.
> >
> > Is this possible in MySQL?
> > Does anyone know if it cab be performed with other RDBMS?
> >
> > Regards
> > /Jonas
> >
> >
> >
> >
> >
> > --
> > MySQL General Mailing List
> > For 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]
>



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



RE: Row level security requirements, can I still use MySQL?

2004-11-18 Thread Peter Lovatt
Hi

What about encrypting the data using a password that is specific to the
user. That way only those that know the password for that row can access it.

Locking is really to stop two users editing the same record at the same
time, rather than controlling access.

HTH

Peter



> -Original Message-
> From: Jonas Ladenfors [mailto:[EMAIL PROTECTED]
> Sent: 18 November 2004 09:46
> To: Mysql (E-mail)
> Subject: Row level security requirements, can I still use MySQL?
>
>
> Hello, I am in the position where I need row level user access, this is
> crucial in my current project. I know this has been discussed
> before and the
> answer has been "use views when they become availble". But views
> would still
> allow the "root" user access to the complete table, wouldnt it? I
> would like
> to lock rows to certain user and not let anyone else see them,
> not even the
> root user.
>
> I have been thinking about using heap tables or trying to supply each
> user/group with their own dynamically created tables. But I always come to
> the conclusion that I am hacking away at something I do not fully
> understand
> and that I cannot guaranty that the end result will have the security I
> claim.
>
> Is this possible in MySQL?
> Does anyone know if it cab be performed with other RDBMS?
>
> Regards
> /Jonas
>
>
>
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Returned mail: Data format error

2004-11-16 Thread Peter Lovatt
Virus!

Monty's address was probably spoofed


Peter

> -Original Message-
> From: Spenser [mailto:[EMAIL PROTECTED]
> Sent: 16 November 2004 08:32
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Returned mail: Data format error
> 
> 
> Did the system just reject Monty Widenius' posting?  That can't be
> right.
> 
> 
> On Tue, 2004-11-16 at 02:14, [EMAIL PROTECTED] wrote:
> > The original message was received at Tue, 16 Nov 2004 09:14:51 
> +0100 from mysql.com [173.126.215.252]
> > 
> > - The following addresses had permanent fatal errors -
> > <[EMAIL PROTECTED]>
> > 
> > - Transcript of session follows -
> > ... while talking to 92.153.98.85:
> > >>> RCPT To:<[EMAIL PROTECTED]>
> > <<< 550 5.1.1 <[EMAIL PROTECTED]>... Not known here
> > 
> > 
> > __
> > -- 
> > This message was scanned by BitDefender for Linux Mail Servers,
> > found to be infected and cleaned.
> > 
> > Antivirus report:
> > 1.  File: (MIME part)=>lists.mysql.com.zip=>lists.mysql.com.htm 
>   
>   
>.exe
> >Status: Infected
> >Virus: [EMAIL PROTECTED]
> >http://www.bitdefender.com/vfind/[EMAIL PROTECTED]
> >Action: Deleted
> > 
> > 
> > For more information please visit http://linux.bitdefender.com/
> > 
> > 
> > __
> > -- 
> > MySQL General Mailing List
> > For 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]
> 


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



RE: syntax question..

2004-11-14 Thread Peter Lovatt
Hi

sub selects are only supported from MySql 4.1 onwards, so it may be invalid
if you have an earlier version.

you may also cause a conflict by using the database alias (t1) as the name
of the result

Peter

> -Original Message-
> From: kalin mintchev [mailto:[EMAIL PROTECTED]
> Sent: 14 November 2004 23:06
> To: [EMAIL PROTECTED]
> Subject: syntax question..
>
>
> hi everybody..
>
> can somebody please explain what is wrong with this command:
> select t1.data from table1 as t1 where t1.zip=(select * from table2 as t2
> where t2.chain like "%carmike%");
>
>
> thank you...
>
>
> --
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Command that I believe should work...

2004-10-15 Thread Peter Lovatt
hi

you might want to look at TIMESTAMP which does it  all for you.

Peter

> -Original Message-
> From: Robert Adkins [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2004 20:23
> To: MySQL General List
> Subject: Command that I believe should work...
>
>
> ...but doesn't.
>
> I am attempting to create a table using the following...
>
>
> CREATE TABLE INVOICE (
> INV_NUMBER   INTPRIMARY KEY,
> CUS_CODEINT NOT NULL  REFERENCES
> CUSTOMER(CUS_CODE),
> INV_DATE DATETIME   DEFAULT NOW()   NOT NULL,
> );
>
> I receive an error message stating that there is an error with 'NOW()'
>
> Which doesn't make sense to me. I understand both Oracle and MS-SQL
> Server use a similar format for putting the date and time into a field
> when a new row is created. At least that is my goal.
>
> Is there a very different method of doing this under MySQL 4.0.21?
>
> Thanks for any assistance you may offer.
>
> -Rob
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Telephone number column not working

2004-10-02 Thread Peter Lovatt
Hi

could it be that the - or a space is upsetting things?

111-111- might be calculated to give -

or if the user enters a space it is no longer an integer

unless you need it to be an integer,  telephone numbers are usually stored
as a char type

HTH

Peter



> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 02 October 2004 13:00
> To: [EMAIL PROTECTED]
> Subject: Telephone number column not working
>
>
> I have a field "telephone".
> Set to type :int:
> Length: 11
> It's  not working correctly, and not sure if it's my
> application or something I have wrongly set up for the
> database.
> We are talking about U.S. Telephone numbers here, so 7
> digits (area code, exchange, unique number)
>
> Now it seems everything works up to the storing of 6
> numbers.  Once I add the 7th number, everything goes
> haywire.  The number gets transformed to some totally
> different number and / or 0 (zero).
>
> Now I had set up a validation , which I think would be
> correct for a U.S. number:
>
> [0-9\+\-\/ \(\)\.]+
>
> Yet, even if I remove that regexp and let it validate
> solely on integers: -{0,1}\d+
>
> Nothing.
> I thought perhaps enforcing the field to unsigned
> might help, but no change.
>
> One last note, I've "now" added some javascript to
> enforce format.  This hasn't changed anything , better
> or worse.  Same behaviour.  This is solely for making
> sure client enters 111-111- format.  Just wanted
> to include this in my information.
>
> Well if anyone has a clue appreicate the help.
>
> Stuart
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Copying rows based on query result to another table?

2004-09-14 Thread Peter Lovatt
try

INSERT INTO other_table
( field1, field2, etc)
SELECT SQL_CALC_FOUND_ROWS *
FROM wow.resume r
INNER JOIN wow.candidate c
WHERE r.Section_ID = '1'
AND MATCH (r.Section_Value)
AGAINST ('+BAAN' IN BOOLEAN MODE)
AND c.Candidate_ID = r.Candidate_ID

Peter

> -Original Message-
> From: Eve Atley [mailto:[EMAIL PROTECTED]
> Sent: 14 September 2004 18:18
> To: Mysql
> Subject: Copying rows based on query result to another table?
>
>
>
> I want to copy rows of data from a query result to another table. How do I
> accomplish this? Here's my example for further explanation...
>
> I have 2 tables, candidate and resume. I have 2 other (currently empty)
> tables, exact duplicates, candidate_erp and resume_erp. In resume_erp will
> be duplicates from resume that contain 'ERP' (Enterprise Resource
> Planning)
> keywords, ie. BAAN, SAP, Peoplesoft, and more. In candidate_erp
> will be the
> associated 'candidate' rows. When I construct my SQL query and
> run it, I can
> successfully view the resulting query which contain the keyword BAAN. How
> can I then copy those results into candidate_erp?
>
> A query example...
>
> SELECT SQL_CALC_FOUND_ROWS *
> FROM wow.resume r
> INNER JOIN wow.candidate c
> WHERE r.Section_ID = '1'
> AND MATCH (r.Section_Value)
> AGAINST ('+BAAN' IN BOOLEAN MODE)
> AND c.Candidate_ID = r.Candidate_ID
>
> I notice that MySQL CC and MySQL Query Browser both have the ability to
> export to a file (ie. CSV), but it doesn't appear they will import neatly
> into the tables candidate_erp and resume_erp.
>
> Thanks in advance,
> Eve
>
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Multiple MysQL servers with different IP address on same machine

2004-09-09 Thread Peter Lovatt
Hi

We have a machine with 2 IP addresses and mysql 3.23 on one and 4.10 on the
other. Both using port 3306

One instance listens on localhost, which maps to 127.0.0.1, and also on one
of the public IP addreses and the other listens to the other IP address.

I use the IP address in the connection string and so far it  works fine. I
am in the process of setting up the server, and only have phpmyadmin
installed (twice - one installation per mysql server) but that works
correctly, so I expect everything  else will.

HTH

Peter




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 09 September 2004 14:53
> To: Sanjeev Sagar
> Cc: [EMAIL PROTECTED]; Sanjeev Sagar
> Subject: Re: Multiple MysQL servers with different IP address on same
> machine
>
>
> I need to add to my previous post -- You asked about using the SAME
> operating system socket as well as using separate addresses with the same
> port number (different IP sockets)
>
> My answer to that is NOT ON YOUR LIFE. Think of the chaos. If one client
> tried to connect to an OS socket that 3 different servers were listening
> to... Which one gets the connection? Which one validates the client? If
> for some reason the client *were* able to validate against all three
> servers at the same time, how could it sort out the 3 different responses
> to a query?
>
> NO each server must have it's own socket. It doesn't matter if we are
> discussing "IP sockets" or "OS sockets" the answer is still the same.
>
> Sorry for the previous oversight,
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
>
> "Sanjeev Sagar" <[EMAIL PROTECTED]> wrote on 09/08/2004
> 05:04:38 PM:
>
> >
> > Hello All,
> >
> > MySQL : Standar Binary 4.0.20
> > O/S : Red Hat Linux release 9 (Shrike)
> > Linux  2.4.20-31.9smp #1 SMP Tue Apr 13 17:40:10 EDT 2004 i686 i686
> > i386 GNU/Linux
> >
> > I already have setup of Three Multiple MySQL servers listening on
> > different ports and sockets on same machine
> >
> > Option File:
> >
> > [mysqld1]
> > server-id =1
> > port=3306
> > socket=/tmp/mysql.sock
> > datadir=data1
> >
> > [mysqld2]
> > server-id=2
> > port=3307
> > socket=/tmp/mysql.sock2
> > datadir=data2
> >
> > [mysqld3]
> > server-id=3
> > port=3308
> > socket=/tmp/mysql.sock3
> > datadir=data3
> >
> > All three servers started with no problem. Question is if I don't
> > want to use different ports or scokets, can I use the different I.P.
> > Addresses on same machine for three servers with same default port or
> socket.
> >
> > /etc/hosts file
> > ===
> >
> > 127.0.0.100  s1
> > 127.0.0.101  s2
> > 127.0.0.102   s3
> >
> >
> > Can I start three servers on  same port (3306), same socket
> > (/tmp/mysql.sock) on same machine by using above IP addresses? If
> > yes then HOW?
> >
> > Can I use the replication in b/w them? keeping datadir and log-bin
> > directory differtent is not a problem.
> >
> > Appreciate it.
> >
>



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



RE: What's Faster? MySQL Queries or PHP Loops?

2004-09-08 Thread Peter Lovatt
Hi

Just my two pence worth. Its not tested or scientific, and is based on gut
feeling and experience.

Connecting to mysql is resource intensive, particularly if you make a fresh
connection for each query. A query will almost certainly involve disk acces
which is slow. Sending the result of the query to php will also be resource
intensive. In short the best approach is query efficiently as little as
possible.

What I do is to try and get all information in a single query and then use
php from there on. I go as far as building arrays from result sets and
manipulating the data using php.

Can't guarantee this is best practice but I have built big sites with big
visitor numbers this way and they run OK :)

HTH

Peter



> -Original Message-
> From: Brent Baisley [mailto:[EMAIL PROTECTED]
> Sent: 08 September 2004 19:01
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: What's Faster? MySQL Queries or PHP Loops?
>
>
> I would try not to query MySQL on each iteration of the loop. While a
> dozen or so queries may not make a noticeable difference, hundreds or
> thousands may. It's not a scalable technique, whether you need to scale
> it or not. Even if it's only 100 iterations, what if you have 10 people
> accessing the database at once? That's now 1,000 queries.
> You should try to have MySQL organize the data for you. Since you are
> using Dreamweaver to generate your code, your SQL knowledge may not be
> up to it. But there are a number of query options. Perhaps if you
> posted your table structure and the result you are looking for, the
> list could help with a query.
>
> Even though everything is on one machine, you still needed to do lots
> memory transfer from MySQL to Apache/PHP. The difference may not be
> noticeable, but I would always try to design for scalability. MySQL is
> designed to handle data so I would let it.
>
> On Sep 8, 2004, at 11:28 AM, Robb Kerr wrote:
>
> > Here's the scenario...
> >
> > First, my HTTP Server (Apache), PHP Server and MySQL Server are on the
> > same
> > machine - an Apple Xserve.
> >
> > Second, I've got a page with a long repeat region reflecting a
> > recordset
> > queried out of a MySQL table. The region also displays information
> > obtained
> > from fields in a related table.
> >
> > Third, I use Dreamweaver to generate my MySQL recordsets and repeat
> > regions.
> >
> > Here's the question...
> >
> > I can either A) in the header or my page, generate a recordset of all
> > of
> > the records in the related table and then loop through the recordset
> > creating an array of the fields I need and then later pull from it in
> > the
> > repeat region... or B) take the six lines of code Dreamweaver
> > generates to
> > create a recordset and move them into the repeat region itself. In
> > other
> > words, I can create a recordset of all of the records in the related
> > table,
> > loop through it generating a PHP array and pull from this array later
> > OR I
> > can query the database every time through the loop while creating the
> > repeat region.
> >
> > Since I haven't freed the table until the bottom of the page and
> > because my
> > MySQL Sever and PHP Server reside on the same machine, will I really
> > notice
> > a measurable difference in speed? If my MySQL Server were a different
> > machine, I'm sure that there would be a noticable difference because
> > all of
> > the queries would be across a network (possibly the internet) and
> > traffic
> > would become a factor.
> >
> > Just wondering what other people have noticed. BTW, I've also posted
> > this
> > on the PHP board.
> >
> > Thanx
> > --
> > Robb Kerr
> > Digital IGUANA
> > Helping Digital Artists Achieve their Dreams
> > 
> > http://www.digitaliguana.com
> > http://www.cancerreallysucks.org
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> > http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
> --
> Brent Baisley
> Systems Architect
> Landover Associates, Inc.
> Search & Advisory Services for Advanced Technology Environments
> p: 212.759.6400/800.759.0577
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Root password lost?; can't manage existing database...

2004-08-23 Thread Peter Lovatt
Hi

the usual syntax is mysql -u root -p

if that does not work look into

skip grant tables option

http://dev.mysql.com/doc/mysql/en/Resetting_permissions.html


HTH

Peter



> -Original Message-
> From: DBS [mailto:[EMAIL PROTECTED]
> Sent: 23 August 2004 03:50
> To: [EMAIL PROTECTED]
> Subject: Root password lost?; can't manage existing database...
>
>
> Hi,
>
> I have a problem, It's been months since I used MySQL and (I
> believe) I had
> set it up with a root password.  Now I can't log on to MySQL as root MySQL
> user and create a new user or manage an existing user (I can log
> onto server
> as root of course).  I'm running MySQL 3.23 and RH Linux 8.  The one
> database that is running is running fine and no problems with it.  It has
> run so well with no problems I never tinker with it.
>
> When logged onto server as root, I enter the command "mysql -p -u root" I
> get the error message: "ERROR 1045: Access denied for user:
> '[EMAIL PROTECTED]'
> (Using password: NO)" Also when I type in: 'mysql -p -u userone'
> I also get
> the same error so apparently I can't access the userone either.
> I know what
> the password is for userone but I don't understand why MySQL is
> not allowing
> me to enter it in.
>
> Actually I'm not even sure if I created a root password for MySQL.  I do
> know that I created a few users and a database which functions
> correctly and
> has been for months - it's linked to a discussion forum and works fine.
>
> However now I can't create any new users, and if I wanted to change the
> password of the existing user - database, or root pw, I can't, or
> don't know
> how.
>
> Can anyone give me a hint as to what I need to do to either -
>
> a. reset the password for the root MySQL user (or log on as MySQL root
> without a MySQL pw) so I can create new databases, manage the existing
> database which is associated with a user.
>
> b. create a new user whether logged on as root or as the user
> name of which
> I want to create the new MySQL database and tables for.
>
> Thanks for any advice,
>
> DBS
>
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Fairly lame question

2004-08-19 Thread Peter Lovatt
Hi

you try setting the column type to TIMESTAMP :)

http://dev.mysql.com/doc/mysql/en/DATETIME.html

Peter



> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: 19 August 2004 17:50
> To: [EMAIL PROTECTED]
> Subject: Fairly lame question
> 
> 
> I think this can be done, but tried a few times with
> no success.  I want a column in a table that sets a
> timestamp.  
> Instead of passing a value from the form though is
> there a way mySql would automagically stamp the
> records as they are inserted ?
> 
> and as a side note - would table type make any
> difference. 
> 
> 4.0.20 - standard
> 
> Thank you,
> Stuart
> 
> -- 
> MySQL General Mailing List
> For 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]



RE: MYSQL RECORDS AND ALPHABETICAL ORDER

2004-08-14 Thread Peter Lovatt
SELECT * FROM mytable ORDER BY alphabetical_field

hth

Peter

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 14 August 2004 08:57
> To: [EMAIL PROTECTED]
> Subject: MYSQL RECORDS AND ALPHABETICAL ORDER
> 
> 
> Dear Friends,
> 
> I have mysql table which retains names,Data is written to mysql 
> table using 
> php query, however when I check the records, I amn't able to do 
> the same in 
> alphabetical order. 
> How do I make mysql to retain records in alphabetical order.
> 
> Any guidance, please.
> 


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



RE: Best options for unique string

2004-08-04 Thread Peter Lovatt
HI

MD5 would be a good way of doing it. Just add a column to your user table
and

UPDATE users SET subscribed = 0 WHERE encryptedID = "md5 hash here"

HTH

Peter




> -Original Message-
> From: Scott Haneda [mailto:[EMAIL PROTECTED]
> Sent: 04 August 2004 03:37
> To: MySql
> Subject: Best options for unique string
>
>
> I am building a mailing list manager, using mysql 4 at the moment.  I want
> to have a simply web interface where one can remove themselves from a
> mailing list. This will most likely be supplied as a link in a email that
> will be sent to them when they email in and request info about a mailing
> list.  What I don't want is to have a link like [EMAIL PROTECTED]
> but would rather mask that email address as a unique string.
>
> I was thiking that on INSERT I can use a timestamp with some
> random and that
> should be pretty much guaranteed to be unique, I could just use the PK but
> then people could fiddle the url and mess with others accounts.  So I need
> something non sequential, rather random looking at least, perhaps somehow
> make mysql case sensitive on this one as well. (How does one make
> mysql case
> senseitive on a field?)
>
> Would MD5(user_email_address) pretty much be what I am after?
>
> I don't suppose there is any way to "un-MD5" something?
> --
> -
> Scott HanedaTel: 415.898.2602
> http://www.newgeo.com   Fax: 313.557.5052
> [EMAIL PROTECTED]Novato, CA U.S.A.
>
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Database Connection Questions

2004-06-27 Thread Peter Lovatt
hi

the

/home/lark/public_html/connection.php on line 23

just refers to the file within the context of the whole file system and is
fine

the rest says that mysql cannot/does not execute the query so there is no
result to use.

the @ suppresses error messages so it may be best to remove  it

try

  mysql_connect ("localhost" , "USERNAME" , "PASSWORD");
  or die(mysql_error());

  mysql_select_db ("DATABASE");
  or die(mysql_error());

which may tell you more - I suspect a permissions problem if it works on a
local server

If you are switching from a Windows machine to Linux remember to watch for
case sensitivity problems.


HTH

Peter




> -Original Message-
> From: David Blomstrom [mailto:[EMAIL PROTECTED]
> Sent: 27 June 2004 20:49
> To: [EMAIL PROTECTED]
> Subject: Database Connection Questions
>
>
> I'm previewing local pages with a database connection
> that looks something like this:
>
> @mysql_connect ("localhost" , "USERNAME" ,
> "PASSWORD");
> @mysql_select_db ("DATABASE");
>
> I modified it for an online site and published it
> online. But when I preview a page, I get error
> messages like the following:
>
> Warning: mysql_fetch_array(): supplied argument is not
> a valid MySQL result resource in
> /home/lark/public_html/connection.php on line 23
>
> Warning: mysql_fetch_assoc(): supplied argument is not
> a valid MySQL result resource in
> /home/lark/public_html/connection.php on line 41
>
> Warning: mysql_fetch_assoc(): supplied argument is not
> a valid MySQL result resource in
> /home/lark/public_html/connection.php on line 45
>
> Do those URL's look odd - like they're OUTSIDE of my
> website (/public_html/)?
>
> And I get this error at the bottom of the page:
>
> "Invalid query: No database selected"
>
> So I published my database to a different website and
> tried to make a remote connection. I was told that all
> I have to do is replace "localhost" with a URL, so my
> new query looks like this:
>
> @mysql_connect ("www.othersite.org" , "USERNAME" ,
> "PASSWORD");
> @mysql_select_db ("DATABASE");
>
> But I get the same results. I'm not even sure where to
> begin troubleshooting, because I'm not certain what
> the root of the problem is.
>
> Any suggestions?
>
> Thanks.
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail
>
> --
> MySQL General Mailing List
> For 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]



RE: MYSQL Setup Question

2004-06-26 Thread Peter Lovatt
hi

the error is because you have more or fewer items of data than fields or
columns to put it in

it is better practice to include fields in your query


INSERT   INTO sometable
(
field1
, field2
, field3
)
VALUES
(
"data"
, "more data"
, "even more"
);

Peter


> -Original Message-
> From: Leon Ellis [mailto:[EMAIL PROTECTED]
> Sent: 26 June 2004 10:14
> To: MYSQL
> Subject: MYSQL Setup Question
>
>
> I am brand new to MySQL
> Running MYSQL 4.0.16 on FreeBSD.
> When I try to add a user, with the following code I
> get an error.
> INSERT INTO user
> VALUES
> ('localhost','username',password('Secret'),
> 'Y','Y',...);
> I have used inwhere from 6 'Y's (Friends
> Recommendation) to 14 'y's MYSQL manual.
> I get the following error:
> Column count doesn't match value count at row 1.
> What did I do wrong.
> Thanx in advance.
> Leon
>
>
>
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
>
> --
> MySQL General Mailing List
> For 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]



RE: New to Dates - Plain English Please

2004-06-22 Thread Peter Lovatt
hi

SELECT DATE_FORMAT(date_field ,"%M %D %Y")
 FROM table1
ORDER BY date_field

will order in true chronological order 

Peter



> -Original Message-
> From: David Blomstrom [mailto:[EMAIL PROTECTED]
> Sent: 22 June 2004 10:17
> To: [EMAIL PROTECTED]
> Subject: RE: New to Dates - Plain English Please
> 
> 
> --- Peter Lovatt <[EMAIL PROTECTED]> wrote:
> > Hi
> > 
> > There are two aspects to dates, and your questions
> > include parts of both.
> > 
> > When MySql stores dates you have a choice of column
> > types
> > 
> > http://dev.mysql.com/doc/mysql/en/DATETIME.html
> > 
> > has the details
> > 
> > If you just need to store dates then the DATE type
> > will suit your needs. You
> > just specify it as DATE
> > 
> > When you insert dates you need to insert them in the
> > format -mm-dd ie
> > 2004-12-31
> > 
> > When you retrieve them they default to the same
> > format.
> > 
> > If you wanted to retrieve them in a different format
> > that is when you use
> > DATE_FORMAT(date,format)
> > 
> > eg
> > 
> > INSERT  INTO table1
> > (
> > field1
> > , date_field
> > , field2
> > )
> > VALUES
> > (
> > "some data"
> > , "2004-02-12"
> > , "some more data"
> > );
> > 
> > 
> > then to retrieve the data
> > 
> > SELECT DATE_FORMAT(date_field ,"%M %D %Y")
> > FROM table1
> > 
> > would return "February 12th 2004" instead of
> > "2004-02-12"
> > 
> > Hope this clarifies it..
> > 
> > Come back to me if not
> 
> Can you also print out your dates as February 12th,
> 2004, but order them by 2004-12-08? In other words,
> can you order dates chronologically, even though March
> comes before August alphabetically?
> 
> Thanks.
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> -- 
> MySQL General Mailing List
> For 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]



RE: New to Dates - Plain English Please

2004-06-22 Thread Peter Lovatt
Hi

There are two aspects to dates, and your questions include parts of both.

When MySql stores dates you have a choice of column types

http://dev.mysql.com/doc/mysql/en/DATETIME.html

has the details

If you just need to store dates then the DATE type will suit your needs. You
just specify it as DATE

When you insert dates you need to insert them in the format -mm-dd ie
2004-12-31

When you retrieve them they default to the same format.

If you wanted to retrieve them in a different format that is when you use
DATE_FORMAT(date,format)

eg

INSERT  INTO table1
(
field1
, date_field
, field2
)
VALUES
(
"some data"
, "2004-02-12"
, "some more data"
);


then to retrieve the data

SELECT DATE_FORMAT(date_field ,"%M %D %Y")
FROM table1

would return "February 12th 2004" instead of "2004-02-12"

Hope this clarifies it..

Come back to me if not

Peter









> -Original Message-
> From: David Blomstrom [mailto:[EMAIL PROTECTED]
> Sent: 22 June 2004 07:40
> To: [EMAIL PROTECTED]
> Subject: New to Dates - Plain English Please
>
>
> I  haven't worked with dates yet and wondered if
> someone could give me an overview in plain English.
>
> At the moment, I'm working on a table with a column of
> dates in this format:
>
> March 2, 2003
> July 7, 2004
>
> If I understand the Manual, the correct format for
> these dates in a MySQL table would be like this:
>
> 03-02-2003
> 07-07-2004
>
> Am I right?
>
> When I create a DATE field, do I need to designate a
> Length/Value, Attribute, etc.? If so, how long is
> 07-07-2004 - 8 characters, or ten?
>
> And is it also correct that you can manipulate dates
> in this format to display in other formats? For
> example, 03-02-2003 could be displayed as March 2,
> 2003?
>
> I THINK this is what the Manual is talking about
> here...
>
> DATE_FORMAT(date,format)
> Formats the date value according to the format
> string. The following specifiers may be used in the
> format string:
> Specifier Description
> %aAbbreviated weekday name (Sun..Sat)
> %bAbbreviated month name (Jan..Dec)
> %cMonth, numeric (0..12)
> %DDay of the month with English suffix (0th,
> 1st, 2nd, 3rd, ...)
> %dDay of the month, numeric (00..31)
> %eDay of the month, numeric (0..31)
>
> If so, this must be something you do with PHP, right?
>
> I guess the most important thingn I need to know is
> what format to put my dates in. If 07-07-2004 is the
> standard format, and if I can print/display that in
> various ways, then I can figure the rest out when I
> get to it.
>
> Thanks.
>
>
>
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
>
> --
> MySQL General Mailing List
> For 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]



RE: 6.5 seconds seems slow for the following search?

2004-03-27 Thread Peter Lovatt
Big tables, a join and a LIKE on middleweight hardware - looks about right
to me.

Peter

> -Original Message-
> From: Kyle Renfro [mailto:[EMAIL PROTECTED]
> Sent: 27 March 2004 00:48
> To: [EMAIL PROTECTED]
> Subject: 6.5 seconds seems slow for the following search?
>
>
> I am testing MySQL as a possible replacement for our proprietary db
> server for several large databases.  I really want MySQL but I am
> getting what seems like slow search times.
>
> Does 6.5 seconds seem slow/typical/fast for the following search?
>
> SELECT main.ownername FROM main, rolledplate WHERE rolledplate.platenum
> LIKE '3^6SP%' AND main.recid = rolledplate.recid;
>
> The 'main' table has 21+ million records.  The 'rolledplate' table has
> 144+ million records.
>
> The EXPLAIN gives pretty optimal results and I have tried the select
> syntax several different ways. The recid field is the PK in the main
> table.  In both tables RECID is an unsigned int with a 1:M relationship
> between main and rolledplate.  The tables are MyISAM with a fixed row
> format.
>
> System Specs:
> P4 2.8 Ghz
> 1 Gb RAM
> Serial ATA disks (data/indexes split on 2 disks)
> MySQL 4.1.1
>
> The my.cnf is a modified my-huge.cnf with info gleened from web/list.
>
> Our in-house db beats the pants off of this (but on better hardware).
> I'm not sure if there is some optimization I have missed, but I have
> tried everything I can think of.  Any suggestions would be greatly
> appreciated.  Server settings or anything else available on request.
>
> thanks!
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Query across two databases on the same server

2004-03-24 Thread Peter Lovatt
select 
db1.table.field, db2.table.field
where 
db1.table.someotherfield = db2.table.someotherfield

Peter

> -Original Message-
> From: Ed Reed [mailto:[EMAIL PROTECTED]
> Sent: 24 March 2004 23:45
> To: [EMAIL PROTECTED]
> Subject: Query across two databases on the same server
> 
> 
> Is there any way to have a single select statement that can do a join
> across two databases on the same server?
>  
> Thanks
> 


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



RE: New to MySQL

2004-03-17 Thread Peter Lovatt
Hi

To use phpMyAdmin you need a webserver and php installed - the code suggests
you either are not running through a webserver or that it is not  configured
for php.

If you are not developing for php you might take a look at windows front
ends for mysql - search the list for recommendations

HTH

Peter


---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

> -Original Message-
> From: Terry Smith [mailto:[EMAIL PROTECTED]
> Sent: 17 March 2004 10:25
> To: [EMAIL PROTECTED]
> Subject: New to MySQL
>
>
> I have just started having a look at MySQL. I have the server
> installed and
> running with the default settings and I now need to create a database and
> tables.  I will be testing all locally on WinXPpro.
>
> I would like to use phpMyAdmin but am having some trouble displaying the
> index.php page. IE shows code, or does not load at all, MacromediaMX is
> complaining about a server not existing. Or is there another way?
> I guess I
> could be missing a few nuts-n-bolts, what services do I need to
> run on WinXP
> and their configs? Is there anywhere where I can find some info
> for absolute
> beginners to try and shorten the learning curve?
>
> Once up and running I expect to be linking using Access 2000 with which I
> have some experience and hope to port over some tables.
>
> Regards
>
>
> --
> MySQL General Mailing List
> For 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]



RE: Sequrity question or am I paranoid?

2004-02-17 Thread Peter Lovatt
no .they really are out to get you :)

Security is always a challenge. You can build the most secure system in the
world but if the users are not educated in security you have wasted your
time.

The "no password" relies on a user knowing what to do. The question is this
OK default behaviour - the number of MS SQL installations with no master
password (I remember reading an article about it) says that there are plenty
of newbie/uneducated/amater/stupid DBAs out there for it to be problem.

Perhaps forcing the user into setting a password during setup would be a
good idea, particularly as MySql expands its userbase beyond the net, where
security tend to be a priority and DBAs tend to be reasonably skilled.

The password is less of a problem - if you set 'letmein' or something well
known then the argument above applies. If your password is secure then a)
only a user with access to the MySql database will see the encrypted
password, so they probably already know the root password anyway. b)you
would still have to try thousands or millions of combinations before you
found the right one. Not impossible, but a reasonable barrier.

If you try a brute force attack as an external user trying to login, MySql
will lock you out after 10 attempts.

just my 2p worth :)

Peter


---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---







-Original Message-
From: Steenveld, A. [mailto:[EMAIL PROTECTED]
Sent: 17 February 2004 13:23
To: [EMAIL PROTECTED]
Subject: Sequrity question or am I paranoid?


I'm new to MySQL and in starting to use it some questions came up to me
about sequrity. Please allow me to post them here.

Why is is that MySQL on a new installation has *no* password at all?
OK, the documentation gives you a waring for it and strongly suggest
to install one. But why not installing it with a default password?
(Of cause, just as unsafe, but at least one must read the manual
before they stumble into dangerous territory)

Why is it that the documentations pays so less attention to the fact
that a password is assingned on a link/user basis? (To less is what
it looks to me, I just overlooked the whole concept and had the
database wide open for everyone without me knowing about it.)

To my opinion these two point should be handled as bugs.


And last but not least I noticed that it is possible to guess any
password when you have access to the user table in mysql. Let me
tell you how.
Passwords are stored in an encripted way but when two users have
the same password they will end up with the same encripted item
in the user table. E.g. in the table below the users 'root' and
'me' use the same password.
+---+-+--+
| host  | user| password |
+---+-+--+
| localhost | root| 58982d15048734ee |
| localhost | me  | 58982d15048734ee |
+---+-+--+

An easy way to do something about this is not to encript
password("")
but something like password("@=") which will guarantee
a different encription for each user/host combination.

Kind regards,

André Steenveld.

--
MySQL General Mailing List
For 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]



RE: Can't connect URGENT!

2004-02-07 Thread Peter Lovatt
Hi

You can only connect as root from localhost for security I think.

If you want to connect from elsewhere create a new user and use that - look
for GRANT on www.mysql.com

Peter

-Original Message-
From: Duke, Brian [mailto:[EMAIL PROTECTED]
Sent: 08 February 2004 01:50
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Can't connect URGENT!


Hmmm, I dunno.
Perhaps the term: mysql -h 'server' -u root
Should be changed to: mysql -h your_hostname -u root
As "your_hostname" is the actual FQDN of your server.

Brian Duke
SS-TCAM//87797



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 07, 2004 5:30 PM
To: [EMAIL PROTECTED]
Subject: Can't connect URGENT!

Hi,

I have instaled mysql 4.0.17 on a debian server, but i have a big
problem.
I can only connect to mysql at the server and only with -h localhost. If
I try
this:
 mysql -h server -u root

from anywhere i receice always the same response:

 ERROR 2003: Can't connect to MySQL server on 'server' (111)

the only way I can connect to the server is typing

mysql -h localhost -u root

at the server.

Can anyone please help? I already search at google and can fine
anything.

TIA

Carlos Baptista

-
This mail sent through IMP: http://horde.org/imp/

--
MySQL General Mailing List
For 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]




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



RE: Downloading/Exporting delimited text files

2004-02-04 Thread Peter Lovatt
hi

it is very simple in php




$query = 'SELECT *
FROM table
WHERE somefield = "'.$somevalue.'"
ORDER BY somefield
';
$mysql_result = mysql_query($query, $mysql_link);


while($row = mysql_fetch_array($mysql_result))
{

$output .=
"\"$row["somefield"]\"\t\"$row["some_other_field"]\"\t\"$row["yetnother_fiel
d"]\"\t" ;


}// end while


(not tested)


\t is the tab character

hth

Peter


---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---




-Original Message-
From: Catalist Solutions [mailto:[EMAIL PROTECTED]
Sent: 04 February 2004 09:04
To: MySQL Mailing List
Subject: Downloading/Exporting delimited text files


Hi,

I hope someone can point us in the right direction.

We have built up a database of over 2 million part numbers applicable to the
horticultural machinery trade.

This is held on our website in a MySQL database and subscribers can do all
sorts of searches by manufacturer or part number or description, whatever.
It all works well having used Dreamweaver to generate the various web pages.

We now want to allow them to download a tab delimited text file for
importing into their own standard spreadsheets and databases (unlikely to be
MySQL).

We are struggling with this as there don't appear to be any Macromedia
Extensions which will allow us to do this within DreamWeaver.

Will we have to use PHP in order to achieve this task? PHPAdmin allows us to
do the above but we don't want our subscribers to use PHPAdmin, we want them
to just click buttons on a web page.

Any comments anyone?

Thanks and regards,

Bernard Norrie
Catalist Solutions Ltd.




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



RE: SQL Query

2004-01-18 Thread Peter Lovatt
SELECT *
>From articles
WHERE SectionID=1
ORDER BY EntryDate DESC
LIMIT 1,10

the where clause should be after the table name

HTH

Peter



-Original Message-
From: Ian O'Rourke [mailto:[EMAIL PROTECTED]
Sent: 18 January 2004 11:22
To: [EMAIL PROTECTED]
Subject: SQL Query


Any idea what is wrong with the following:


SELECT * From articles ORDER BY EntryDate DESC
LIMIT 1,10
WHERE SectionID=1

I want to return all articles with a particular SectionID, ordered by
EntryDate and then I want to pick the start point and list the next 10 from
that. Obviously in the final version the start point and the SectionID will
be dynamic.

I have tried removing the LIMIT part. I've tried changing the SectionID to a
different field it always gives me an uninformative error?


--
MySQL General Mailing List
For 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]



RE: Looking for a tool

2004-01-13 Thread Peter Lovatt
phpMyAdmin will do it.

http://www.phpmyadmin.net/




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 14 January 2004 01:15
To: [EMAIL PROTECTED]
Subject: Looking for a tool
Importance: High


Several years ago, I used a cgi based tool that allowed me to upload a csv
file to a server and load the data into either a new table or an existing
table.

Anyone happen to know of one like it now.  I can't seem to find it in my
archives anymore.

I know I can do it with load data infile, but I want the web interface so
that I can had the task off to an admin with minimal skills.

Thanks in advance

--
MySQL General Mailing List
For 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]



RE: transaction support

2004-01-05 Thread Peter Lovatt
Hi

We have been running MySql since 1998 and have never had any data corruption

We have servers running millions of queries a day and they are bullet proof.

>
> > Hi,
> >
> > I'm trying to get a software designer to write us some software using
> > MySQL as the database server (he currently requires MS SQL). It is all
> > windows based software (written in VB).
> >
> > So far his arguments against it are this (not my words):
> >
> > -No explicit transactional support

wrong

http://www.mysql.com/doc/en/ANSI_diff_Transactions.html



> > -MySQL is still buggy

wrong

MySql code audit showed it was 6 times less buggy than most commercial
software

http://www.reasoning.com/newsevents/pr/12_15_03.html

just whisper the word 'slammer' in his ear and see what response you get :)


> > -MyODBC is buggy and not used in production environments

don't know - we use php, but I have used MyODBC occasionally without
problems


> > -Only way to connect using ODBC is third party drivers that cost over
> > half as much as MS SQL
> >

wrong
MyODBC is available under GPL
http://www.mysql.com/products/myodbc/index.html

unless you sell your software in which case licence fees may be due, but
they are very reasonable.


HTH

Peter






> > This is just for our current software, the new software he is bidding on
> > says he would use .NET so that supposedely causes other problems.
> >
> > Now, I know there are a few discrepancies there but I just don't know
> > enough to argue it. I * need* to use MySQL as the server because of cost
> > reasons. I *WANT* to use MySQL because I don't care for MS choose not to
> > run their products.
> >
> > If you can give me any information to help me argue this I would really
> > appreciate it.
> >
> > Thanks,
> >
> > Bryan
> >
> >
> > --
> > MySQL General Mailing List
> > For 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]
>
>


--
MySQL General Mailing List
For 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]



RE: Basic error

2003-12-17 Thread Peter Lovatt
try adding an error report after the query

$result = mysql_query( "select * from domains" ) or die (mysql_error());

the rest looks OK


Peter

-Original Message-
From: Trevor Rhodes [mailto:[EMAIL PROTECTED]
Sent: 17 December 2003 22:26
To: [EMAIL PROTECTED]
Subject: Basic error


Hello friendly helper types,

What is the problem here.  I can't find any errors. I know it's there but as
a
newbie I'm as blind as a bat at the moment.  Thanks for your help.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource

===
$link = mysql_connect( "localhost", $user, $pass );
if ( ! $link )
die( "Couldn't connect to MySQL" );
mysql_select_db( $db, $link )
or die ( "Couldn't open $db: ".mysql_error() );
$result = mysql_query( "select * from domains" );
$num_rows = mysql_num_rows( $result );
print "There are currently $num_rows rows in the table";
print "\n";
while ( $a_row = mysql_fetch_row( $result ) )
{
print "\n";
foreach ( $a_row as $field )
print "\t$field\n";
print "\n";
}
print "\n";
mysql_close( $link );
===

 Regards
  Trevor Rhodes
===
Powered by Linux- Mandrake 9.1
Registered Linux user # 290542 at http://counter.li.org
Registered Machine #'s 186951
Mandrake Club Silver Member
Source :  my 100 % Microsoft-free personal computer.
===
 09:25:17 up 1 day,  9:14,  1 user,  load average: 1.02, 1.09, 1.08
--
Never mud wrestle with a pig.. you get dirty and the pig enjoys it!
Never try to teach a pig to dance. You waste your time and annoy the pig.


--
MySQL General Mailing List
For 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]



RE: SEQUENCES

2003-12-15 Thread Peter Lovatt
Try 

Insert INTO `table` ( `inc_field` ) values (10)

the auto inc field will then generate the next sequential numbers

HTH

Peter


-Original Message-
From: Graham Little [mailto:[EMAIL PROTECTED]
Sent: 15 December 2003 14:01
To: '[EMAIL PROTECTED]'
Subject: SEQUENCES


I was wondering whether it was possible to make and AUTO_INCREMENT
field instead of always adding 1 and starting at zero, into a SEQUENCE 
type field so that it is say a 10 digit integer and numbers are created 
according to the SEQUENCE.

thanks
Graham


This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com


-- 
MySQL General Mailing List
For 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]



RE: mysql remote access on linux

2003-12-02 Thread Peter Lovatt
Hi

try running

 GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
   ON database.*
   TO [EMAIL PROTECTED]
   IDENTIFIED BY 'pass';

where 'hostname' is the one in the error message


HTH

Peter




-Original Message-
From: Louis van der Merwe [mailto:[EMAIL PROTECTED]
Sent: 02 December 2003 15:01
To: [EMAIL PROTECTED]
Subject: mysql remote access on linux


Hi,

Can someone please tell me how to set up a linux mysql server to accept
connections from remote machines.

I have tried creating users for all of the remote host, and creating
users with host '%' and '*', everytime I try to connect using myodbc or
mysqlcc, I get the error "host {host name} is not allowed to connect to
this mysql server"

I really need to resolve this problem soon.

Why don't I get the same error when running mysql on windows ?


Thanks

Louis


-- 
MySQL General Mailing List
For 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]



RE: designer

2003-11-30 Thread Peter Lovatt
Hi

try DEZIGN FOR DATABASES

http://www.datanamic.com/

hth

Peter

-Original Message-
From: Alaios [mailto:[EMAIL PROTECTED]
Sent: 30 November 2003 20:27
To: [EMAIL PROTECTED]
Subject: designer


Do u know any programme that can degin databases in order to design before i
implement them? It ll be very useful if the design was transformed to the
correspondings create syntax? Thx


-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now



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



RE: programming language

2003-11-24 Thread Peter Lovatt
Hi

php

http://www.php.net

would be a good start.

Peter

-Original Message-
From: S Kusumo [mailto:[EMAIL PROTECTED]
Sent: 24 November 2003 12:09
To: [EMAIL PROTECTED]
Subject: programming language


Hello ..

I'm a CLIPPER programmer. I'm looking for programming language (like
Clipper) for MySql, that supports constructs such as LOOP, If-then-Else etc.

Appreciate someone who could respond..

S Kusumo
[EMAIL PROTECTED]



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



RE: new install failure

2003-11-12 Thread Peter Lovatt
Have you checked permissions - the files should be owned by mysql

Peter

-Original Message-
From: DePhillips, Michael P [mailto:[EMAIL PROTECTED]
Sent: 12 November 2003 21:38
To: [EMAIL PROTECTED]
Subject: new install failure


HI list



When installing mysql 4.16 on debian linux 2.4.20-20.8smp

I get the following errors...



---snip-
--

031112 16:05:08  mysqld started

031112 16:05:08  InnoDB: Started

031112 16:05:08  Fatal error: Can't open privilege tables: Can't find file:
'./mysql/host.frm' (errno: 13)

031112 16:05:08  Aborting

---end
snip



host.frm is in mysql/data where it belongs,



any idea why this is happening?



Thanks




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



RE: Hardware Raid and 2 Gig Limit

2003-10-31 Thread Peter Lovatt
Hi

We are working with a lot of smaller databases, (The biggest is 600MB) so I
am not sure about single large files.

It works by checksumming parts of the file (not sure at what level), so if
only one of twenty sections has changed it will only update that section. So
if most of your 10GB is static data then it will need very little updating.

Peter


---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---





-Original Message-
From: Steve Vernon [mailto:[EMAIL PROTECTED]
Sent: 31 October 2003 14:19
To: Peter Lovatt; Mysql List
Subject: Re: Hardware Raid and 2 Gig Limit


Hiya!

Thanks for the help!!!

Do RSync like big files? Or does it prefer smaller files? I see it supports
larger than 2 Gig files, but, Ive not seen any speed comparrisons etc. E.g.
one big file, or 10 small ones for example.

THANKS!

Steve


- Original Message -
From: "Peter Lovatt" <[EMAIL PROTECTED]>
To: "Steve Vernon" <[EMAIL PROTECTED]>; "Mysql List"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, October 31, 2003 12:17 PM
Subject: RE: Hardware Raid and 2 Gig Limit


> Hi
>
> We have a similar challenge. Offsite backups with huge amounts of data,
> without spending a fortune.
>
> We have a local Linux box and the remote server both running rsync.
>
> http://samba.anu.edu.au/rsync/
>
> Rsync is brilliant because it only updates file sectors that have changed.
> We would only use it if we can stop MySql but then synchronising takes
> minutes (1MB broadband connection), particularly using compression.
>
> If you cannot add your own server software MySql files also compress very
> well (gzip 90%+), but this means some server load.
>
> HTH
>
> Peter
>
>
> ---
> Excellence in internet and open source software
> ---
> Sunmaia
> Birmingham
> UK
> www.sunmaia.net
> tel. 0121-242-1473
> International +44-121-242-1473
> ---
>
>
>
>
>
>
> -Original Message-
> From: Steve Vernon [mailto:[EMAIL PROTECTED]
> Sent: 31 October 2003 12:00
> To: Mysql List
> Cc: [EMAIL PROTECTED]
> Subject: Re: Hardware Raid and 2 Gig Limit
>
>
> Hiya!
>
> Thanks for the quick reply!!!
>
> But dosen't it make more sense to have 20 0.5 Gig files rather than one 10
> Gig file?
>
> I know you can split files, but basically because we have raid I trust it
to
> a point. But I would like to make backup's. It costs a lot to have our
> server provider to do backup's themselves. We can't afford replication and
> backups at the moment. So I plan to stop MySQL. Copy the database files to
a
> temp directory. THen download them at my leisure. Oh and I suppose I need
to
> start MySQL then! ;-) The backup will be to Windows 2000, and I want to be
> able to use the local copy of the files.
>
> So if I have smaller files, I can download them, and keep a local copy.
> Theres no way I want to start downloading a 10 Gig file from the server.
Ok
> I can do it, I have a download manager etc, Iv'e downloaded bigger. But I
> guess it must be a massive strain on the server sending the data, and we
> dont have that fast an internet connection so it's easier. We only have
512
> broadband and it sometimes messes up files larger than 2 Gig.  The
download
> manager realises there is a problem, seems to backtrack or something, so
> takes ages. Cable is not available where I live.
>
> If we go beyond 10 Gigs, it just increases the complexity.
>
> Do you or anyone know of any serious speed differences between having one
> file or 20 smaller files for one table? With one files, isn't there a
worry
> if it gets corrupted you loose the lot?
>
> A couple of years ago I looked into big tables for myself and everyone
said
> you need the raid option in MySQL. Now I'm not sure!
>
> Thanks,
>
> Steve
>
>
>
> - Original Message -
> From: "David T-G" <[EMAIL PROTECTED]>
> To: "mysql users" <[EMAIL PROTECTED]>
> Cc: "Steve Vernon" <[EMAIL PROTECTED]>
> Sent: Friday, October 31, 2003 10:44 AM
> Subject: Re: Hardware Raid and 2 Gig Limit
>
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Steve --
> >
> > ...and then Steve Vernon said...
> > %
> > % Hello,
> >
> > Hi!
> >
> >
> > %
> > % Does the 2 Gig file siz

RE: Hardware Raid and 2 Gig Limit

2003-10-31 Thread Peter Lovatt
Hi

We have a similar challenge. Offsite backups with huge amounts of data,
without spending a fortune.

We have a local Linux box and the remote server both running rsync.

http://samba.anu.edu.au/rsync/

Rsync is brilliant because it only updates file sectors that have changed.
We would only use it if we can stop MySql but then synchronising takes
minutes (1MB broadband connection), particularly using compression.

If you cannot add your own server software MySql files also compress very
well (gzip 90%+), but this means some server load.

HTH

Peter


---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---






-Original Message-
From: Steve Vernon [mailto:[EMAIL PROTECTED]
Sent: 31 October 2003 12:00
To: Mysql List
Cc: [EMAIL PROTECTED]
Subject: Re: Hardware Raid and 2 Gig Limit


Hiya!

Thanks for the quick reply!!!

But dosen't it make more sense to have 20 0.5 Gig files rather than one 10
Gig file?

I know you can split files, but basically because we have raid I trust it to
a point. But I would like to make backup's. It costs a lot to have our
server provider to do backup's themselves. We can't afford replication and
backups at the moment. So I plan to stop MySQL. Copy the database files to a
temp directory. THen download them at my leisure. Oh and I suppose I need to
start MySQL then! ;-) The backup will be to Windows 2000, and I want to be
able to use the local copy of the files.

So if I have smaller files, I can download them, and keep a local copy.
Theres no way I want to start downloading a 10 Gig file from the server. Ok
I can do it, I have a download manager etc, Iv'e downloaded bigger. But I
guess it must be a massive strain on the server sending the data, and we
dont have that fast an internet connection so it's easier. We only have 512
broadband and it sometimes messes up files larger than 2 Gig.  The download
manager realises there is a problem, seems to backtrack or something, so
takes ages. Cable is not available where I live.

If we go beyond 10 Gigs, it just increases the complexity.

Do you or anyone know of any serious speed differences between having one
file or 20 smaller files for one table? With one files, isn't there a worry
if it gets corrupted you loose the lot?

A couple of years ago I looked into big tables for myself and everyone said
you need the raid option in MySQL. Now I'm not sure!

Thanks,

Steve



- Original Message -
From: "David T-G" <[EMAIL PROTECTED]>
To: "mysql users" <[EMAIL PROTECTED]>
Cc: "Steve Vernon" <[EMAIL PROTECTED]>
Sent: Friday, October 31, 2003 10:44 AM
Subject: Re: Hardware Raid and 2 Gig Limit


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Steve --
>
> ...and then Steve Vernon said...
> %
> % Hello,
>
> Hi!
>
>
> %
> % Does the 2 Gig file size limit on Linux get broken when I have a
hardware
> % raid controller?
>
> The limit applies only to ext2 filesystems, and not all of them at that;
> ext3 and reiserfs (and others) can happily write much larger files.
>
>
> %
> % My ISP says I don't need the raid option activated on MySQL.
>
> I would generally agree.  I can't imagine an ISP not using a journalled
> filesystem such as those above.  More to the point, though, the mysql
> raid option has nothing to do with disk RAID; they are completely
> separate.
>
>
> %
> % Thanks,
> %
> % Steve
>
>
> HTH & HAND
>
> :-D
> - --
> David T-G  * There is too much animal courage in
> (play) [EMAIL PROTECTED] * society and not sufficient moral courage.
> (work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and
Health"
> http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.7 (FreeBSD)
>
> iD8DBQE/ojzyGb7uCXufRwARAtEmAJ9i3oIMbLTA4yq8koPcEOUwD7SpRwCfe+bn
> rvzVjuD8tIxO8AVj3jp02CI=
> =QdfG
> -END PGP SIGNATURE-
>
> --
> MySQL General Mailing List
> For 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]




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



RE: Import from Paradox

2003-09-17 Thread Peter Lovatt
Hi

Install MyODBC

Set it up for your mysql database

then from Paradox "copy table" to the mysql datasource.

You should get a correctly structured table. Depending on the fieldtypes you
may have to do a little manual tweaking.

You may also not be  able to do memo fields.

MyODBC can be used as a data source in Delphi

HTH

Peter



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 17 September 2003 07:53
To: [EMAIL PROTECTED]
Subject: Import from Paradox


Greetings!
Is there a relatively painless way to import database structure from Paradox
db?
Can MySQL support be inserted instead of BDE into Delphi application
without rewriting large part of it?

--
MySQL General Mailing List
For 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]



RE: [q] can I start MySQL in READONLY mode?

2003-09-02 Thread Peter Lovatt
Hi

When you set up the mysql user use a GRANT statement that only gives SELECT
access. That is effectivly read only access for that user

Peter

-Original Message-
From: Mark Swanson [mailto:[EMAIL PROTECTED]
Sent: 02 September 2003 01:34
To: [EMAIL PROTECTED]
Subject: [q] can I start MySQL in READONLY mode?


Hello,

I have a situation where I'd like to do some debugging against a MySQL
database that's setup so I couldn't modify it (select only). I did some
google searching and searched mysql.com but didn't find much on "readonly".
Is this possible?

I already know I can just backup/restore the datafiles as many times as I
need
to - I was just hoping for a flag or startup option or something.

Thanks.

--
Schedule your world with ScheduleWorld.com
http://www.ScheduleWorld.com/
Java Web start (JNLP):
http://www.ScheduleWorld.com/sw/ScheduleWorld.jnlp


--
MySQL General Mailing List
For 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]



RE: apache/mysql errors....

2003-08-20 Thread Peter Lovatt
HI

from the command line run

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
   ON database_name.*
   TO [EMAIL PROTECTED]
   IDENTIFIED BY 'password';


(you may want to give more restrictive privileges)

that should fix it - you don't have privileges set for the user apache

Peter

-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: 20 August 2003 18:53
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: apache/mysql errors


Hi...

A mysql/Apache issue:

I get the following when I'm trying to run a test web site on an Apache
2.0/RH8.0 setup.


Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in
/var/www/html/dbid/mysql/database.php on line 17

Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]'
(Using password: YES) in /var/www/html/dbid/mysql/database.php on line 17
Could not connect: Access denied for user: '[EMAIL PROTECTED]' (Using
password: YES)
-

I have added the mysql user/password to the php file. I can access mysql
using the user/password from the linux command line.

However, when I check mysql, I don't have an Apache user defined in the user
table. Do I need to have one defined, or should the php app utilize the
user/passwd/dbname that I provide in the db_connect function?

I can access the phpMyAdmin application with no apparent issues/problems...

A check of google indicates that the issue seems to be related to not having
mysql setup for an Apache user

As an additional question, if I have a web app that has a mysql db, do I
need to allow Apache to have access to each table that the app uses...?

Any help/assitance/pointers to resolve this would be greatle appreciated...

Regards,

Bruce
[EMAIL PROTECTED]
(925) 866-2790




--
MySQL General Mailing List
For 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]



RE: Secure Database Design Part II

2003-08-16 Thread Peter Lovatt
Hi

Firstly if your application is well designed then your data should not be accessible 
by the wrong users - if you make sure that there is no way the wrong supplier id can 
be allocated - put an extra 'are you sure this is correct' check, make it so that the 
user id can only be allocated once two people have checked it or something similar.


Another option would be that there is no facility for viewing past quotes at all. If 
there is no facility at all you can give the application rights to insert data only - 
no update or select - adding another layer of security.

If you do need the users to see some history then don't display the detail - no prices 
or part ids - whatever you can get away with.

HTH

Peter



-Original Message-
From: Nils Valentin [mailto:[EMAIL PROTECTED]
Sent: 16 August 2003 05:05
To: Lefevre, Steven; [EMAIL PROTECTED]
Subject: Re: Secure Database Design Part II


Hi Steven,

I believe I understand your concerns. I think the only way to reduce the risk 
of associating the wrong data is tripple checking it by different persons or 
even better make two tables which you can compare against each other. The 
second table only readable to you. This way you could always double check the 
correctness of the distrubutor table (as long as they are in sync ;-)

Best regards

Nils Valentin
Tokyo/Japan



2003年 8月 16日 土曜日 05:36、Lefevre, Steven さんは書きました:
> Hey folks -
>
> Thanks to everyone who gave input to my concerns. Of course, we don't
> intend to have the mysql port open to the world. We will have Apache/PHP
> connect on a unix socket, or to another machine with a cross-cable on
> non-routeable IPs.
>
> But now I have another question. We are working on a web database to allow
> our suppliers to log on and submit information that they would otherwise
> fax, email, or phone to us. It would reduce work in our office, and reduce
> errors in duplication of our information. But, we are very concerned about
> security!
>
> We aren't worried so much about outside hackers as we are about legit users
> trying to gain access to information they shouldn't. Some of our suppliers
> are overseas and we think they have no qualms about trying to hack the
> system, knowing the stunts they have pulled in the past. It would be
> extremely difficult to pursue any problems legally, since it would be
> international, and the damage would be already done.
>
> So, here's my question. Good database design dictates that I normalize my
> tables. So, in this simplified example, we have a table of supplier quotes:
>
> supplier_id
> part_id
> quote_price
> quote_date
>
> All of our suppliers would be drawing from the same table, via php. I'm
> worried that good database design might be more susceptible to information
> 'spilling over' -- what if I make a simple mistake and put the wrong
> supplier_id with a new user's logon? That new user would see all the parts
> that belong to whatever company I mistakenly associate them with.
>
> I'm not so worried about, say, suppliers seeing sales data. All the php
> pages will be protected by Unix filesystem permissions, so I can be
> reasonably certain that only those belonging to the suppliers group will be
> able to execute supplier_*.php. Even if they do load some sales_*.php page,
> then the MySQL user permissions will stop them from actually seeing any
> data on the page. So there are two layers of security between sales and
> suppliers, for example. I would have to make two mistakes for them to have
> access to sales data.
>
> But, when all suppliers are accessing the same pages, it's up to my careful
> hands to make sure they are pulling only their records out of the table. 
> If I make a mistake in a query, it might pull up other records, or even all
> records!
>
> Of course if I design it completely perfectly the first time, I don't have
> to worry about anything. But I'm not perfect and I don't make perfect
> things.
>
> So, I'm thinking I should violate good design principles, and setup
> identical tables for each supplier, salesperson, customer, etc. That way,
> since they share the same PHP pages, they aren't all pulling data from the
> same table. If there is any mixup in the query, the user doesn't have the
> MySQL permission to pull data from another suppliers table.
>
> Does this make sense?
>
> Steve Lefevre
> Network Administrator
> IMI International, Inc.
> 614.839.2500

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


-- 
MySQL General Mailing List
For 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]



RE: Category System schema

2003-07-29 Thread Peter Lovatt
you need at least 3 fields

CategoryID
ParentID
Name

CategoryID is the key, and identifies the category
ParentID is the CategoryID of the parent category
Name is the category name

When you add a sub category you set its ParentID to the CategoryID 

To show all sub categories of CategoryID 99

SELECT * FROM table WHERE ParentID = "99"

HTH

Peter




-Original Message-
From: Alex Pilson [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 06:06
To: [EMAIL PROTECTED]
Subject: Category System schema


Does anyone know the best schema to achieve a multi-level category system?

I need a person to be able to add categories on the fly, but then 
also specify sub categories and even possibly sub-categories of 
sub-cats. I have found two possible ways inside one table with using 
parentID, groupID, etc. But the issue I am now running into is that I 
have to sort on groupID to get the items to "group" correctly when 
showing in a HTML drop down list. Which means I can't sort 
alphabetically. If I do the order is not right...using Lasso 6 with 
some looping code to indent the subs in the list. On top of that I 
would also like the ability to assign a priority field for listing in 
that order as well. There has to be some kind of solution to this 
that I don't see.

Any ideas? Thanks!
-- 
<--->
 Alex Pilson
 FlagShip Interactive, Inc.
 [EMAIL PROTECTED]
<--->

-- 
MySQL General Mailing List
For 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]



RE:

2003-07-29 Thread Peter Lovatt
SELECT * FROM TABLE

if( mysql_num_rows() == 0) table is empty

HTH

Peter

-Original Message-
From: D. K. [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 08:12
To: [EMAIL PROTECTED]
Subject: 


Hello List;
I am developing a php-mysql application for my term project at school and
this is where i seem to not going any further. I  need  to display alll
tables that are holding records,  so the user can make detailed selection
over these tables.Since this is a student-grade database, there are tables
for classes that have not been entered any grades yet. At that point  i need
to determine if a table is empty and avoid displaying it as a selection
choice. Is there a way to do it,to check for an empty set?
Thanks in advance.
Devrim


__
ComputerBild 15-03 bestaetigt: Den besten Spam-Schutz gibt es bei
WEB.DE FreeMail - Deutschlands beste E-Mail - http://s.web.de/?mc=021121


--
MySQL General Mailing List
For 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]



RE: Error creating database

2003-07-22 Thread Peter Lovatt
Hi

when you log in to MySQL use

mysql -u root
you will then be asked to enter a password. On a new instalation the
password may be blank - nothing

After that you should be able to create databases.

You might find information about privilages and GRANT usefull

http://www.mysql.com/doc/en/User_Account_Management.html


HTH

Peter


-Original Message-
From: Ed Dulaney [mailto:[EMAIL PROTECTED]
Sent: 22 July 2003 23:50
To: Mysql
Subject: Error creating database


I get the following error when trying to create a database. Being a total
newbie to MySQL I would appreciate any help I can get!

---
[EMAIL PROTECTED] bobo]$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 129 to server version: 3.23.56

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> CREATE DATABASE bobo;
ERROR 1044: Access denied for user: '@localhost' to database 'bobo'
mysql>
---


Edward C. Dulaney
Chief Engineer
Crawford Broadcasting Company
Colorado Region
(303) 433-5500 (Office)
(303) 801-0439 (Direct)



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



RE: Two problems

2003-07-22 Thread Peter Lovatt


2) Using the Opera browser, I open my pages and it sends variables through 
"?var1=value1&var2=value2" perfectly until I tried using a form and 
realised I am not getting anything back from $PHPSELF...


try $PHP_SELF 

Peter







-- 
http://www.dragonstalon.co.uk/
Latest news at http://www.dragonstalon.co.uk/news.php

-- 
MySQL General Mailing List
For 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]



RE: Setting max_connections

2003-07-22 Thread Peter Lovatt
search for 

my.cnf

If it does not exist you can create it, 

http://www.mysql.com/doc/en/Option_files.html



Peter

-Original Message-
From: Richard Sumilang [mailto:[EMAIL PROTECTED]
Sent: 22 July 2003 07:56
To: [EMAIL PROTECTED]
Subject: Setting max_connections


Where do I go to set the max_connections settings so I can have over 
100?


-- 
MySQL General Mailing List
For 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]



RE: Access control via a role based security model

2003-07-12 Thread Peter Lovatt
Hi

You could achive what you want using grant statements, but you still need a
user interface to send queries to the database and display the information
sent back in a way that is manageble for non techies.

There are many ways of building user interfaces, php ( http://www.php.net )
is probably a good place to start, as it is a web based system, though asp
and Coldfusion might also be worth a look.

With php look at sessions as part of managing the users access.

You can manage user privailges much better through the interface.

Let me know if you would like more depth of information.

Peter




-Original Message-
From: Murray [mailto:[EMAIL PROTECTED]
Sent: 12 July 2003 07:16
To: [EMAIL PROTECTED]
Subject: Access control via a role based security model


I am trying to develop a web based database application to manage a Scout
group.  I need to control the level of access different visitors to the site
are allowed to different parts of the database.  I need to provide public
information, including some contact details from the database, to
unauthenticated (non-member) users and to provide a scale of access to more
information for authenticated members.

The access model would be similar to the following:
Role name  Access
public group leader contact details
member read own details, update some details, read contact
information for all other members
leader as for member plus update youth member progress records
mmbrship secy  update financial details for all members
group leader   access all areas


The mySQL manual shows this can be managed by granting privileges to
individual users based on columns in the various tables.  Can I do it using
a role-based model where I assign one or more of the above roles to a user
and grant the privileges to the role?

Murray Nicholas



--
MySQL General Mailing List
For 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]



RE: mysql server wont start

2003-06-29 Thread Peter Lovatt
Hi

did you run mysql_install_db ? This sets up the mysql database and initial
privilages

Peter

-Original Message-
From: Blake Howe [mailto:[EMAIL PROTECTED]
Sent: 29 June 2003 19:27
To: [EMAIL PROTECTED]
Subject: mysql server wont start


OK i am having problems starting the mysql server on Redhat Linux 8.0.

A little aboutmy background. I have some experience getting around in linux
on the command line. Proably enough just to be dangerous :-). I have
installed and used Mysql under Windows 2000 no problem.

Question:

I installed Mysql from an RPM on Redhat 8.0 Im fairly sure that it installed
properly at least i didnt see any error messages.

This is what it gave me using mysql.server start:
(it gave me basically the same message when using mysqld_safe)

[EMAIL PROTECTED] mysql]# ./mysql.server start
[EMAIL PROTECTED] mysql]# Starting mysqld daemon with databases from
/var/lib/mysql
030629 12:21:45  mysqld ended

I assume this means that the server started with no problem?  When I did a
PS i didnt see the server running in the background I assume it should show
up as a process. Then when i issuied the following according to the
post-install documentation to set intial privlidges it gave this error.

[EMAIL PROTECTED] bin]# mysqladmin -u root password 'star1234'
Illegal instruction


[EMAIL PROTECTED] bin]# ./mysql -u root mysql
Illegal instruction


Im sure there is something simple i have missed but it keeps telling me that
everything is an illegal instruction. Id appreicate any help if someone has
encountered something similar. Any more information you need just tell me.

Thanks for you time,
Blake

_
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


--
MySQL General Mailing List
For 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]



RE: Need your help in a search query

2003-06-26 Thread Peter Lovatt
You could try

SOUNDEX(str)

http://www.mysql.com/doc/en/String_functions.html


which might do what you are looking for


HTH

Peter

-Original Message-
From: Tom Johnson [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 14:23
To: [EMAIL PROTECTED]
Subject: Need your help in a search query


Hi MySQL Experts,

I am pretty new at this and need your help in figuring out if it is possible
to create a query to search for words in a given field.  What I am trying to
do is allow a user to enter words to search for a given title in the
database.  For example, a person is looking up the title "20,000 Leagues
Under the Sea" but is entering only "2" as the search criteria.  When I
run the following query, I get no results.  The problem is with the comma in
20,000.  Any suggestions on how to find the title even though the user only
entered 2???  I am running this on the web using PHP and MySQL.
Possible someone knows of a good search script in PHP that might help also?

Here is the query I was trying to run:

SELECT * FROM ardata
WHERE title LIKE '%user_input%';

I am using MySQL 4.0.13 and PHP 4.3.2

Thanks for helping!

Tom Johnson




--
MySQL General Mailing List
For 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]



RE: SCO UnixWare porting of MYSQL -- stop supporting SCO

2003-06-25 Thread Peter Lovatt
Hi

I agree the SCO action sucks but Open source software should be just that -
open to all, let the courts decide, if it ever gets that far!.

Peter

-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 01:18
To: Daevid Vincent
Cc: [EMAIL PROTECTED]
Subject: Re: SCO UnixWare porting of MYSQL -- stop supporting SCO


On Wed, Jun 25, 2003 at 05:08:27PM -0700, Daevid Vincent wrote:
> mySQL should stop supporting SCO after their ridiculous allegations.

How does MySQL support SCO?

Or are you talking about MySQL abandoning their customers who are
using SCO for one reason or another?

Jeremy
--
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 4.0.13: up 22 days, processed 718,997,404 queries (366/sec. avg)

--
MySQL General Mailing List
For 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]



RE: Help : my Server dies : "Got an error reading communication packets"

2003-06-25 Thread Peter Lovatt
Hi

If you log into MySQL on the command line and enter

mysql>SHOW PROCESSLIST ;

this should show you what is running. You may find a runaway query.

also check the temp disk space while the system is stalling - large joins
can use huge amounts of disk space. If MySql  runs out of disk space it
tries to run the query in the space it has, and queuing queries pile up,
giving the situation you describe.

You can also KILL processes found by SHOW PROCESSLIST without needing to do
a full restart.

The default number of max_Max_used_connections is 100

mysql>SHOW PROCESSLIST ;

will show the maximum opened, if it is 100 then you are getting connections
refused which may give the error messages you are getting.

Also check that there are no problems with file permissions for the
temporary tables

HTH

Peter







-Original Message-
From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]
Sent: 25 June 2003 19:25
To: [EMAIL PROTECTED]
Subject: Help : my Server dies : "Got an error reading communication
packets"


Hello All

I'm desperate. Since two days my Server crashed several times.
This is what happens :
The Webserver ist not responding any more. If i'm lucky i can still log
in.
System load ist 90+(!!!) rapidly increasing.
Top shows  a LOT of mysql processes all eating CPU like hell. There are
also
a lot of httpd processes, but that's like it should be. If i stop
apache,
mysql-process minimise too. When i start Apache back up,  Mysql starts
eating
all my CPU again. When i restart mysql, problem goes away and everything
runs smooth for
a while.
All i can find in error files is that there are a lot of errors in the
form :
030625 19:53:57  Aborted connection 23394 to db: 'abc' user: 'xyz' host:
`localhost' (Got timeout reading communication packets)
030625 19:53:57  Aborted connection 23457 to db: 'abc' user: 'xyz' host:
`localhost' (Got timeout reading communication packets)
030625 19:53:57  Aborted connection 23458 to db: 'abc' user: 'xyz' host:
`localhost' (Got timeout reading communication packets)
at least Ten per Second.

All logs are not showing anything unusual.

To me the situation locks like the Socket is blocked and only a restart
can free the mysql Connection.
Can anyone advice? What can i Do? I am absolutely clueless.
If i can provide anything else to solve the issue? just mail me.


Please Help  :-(
Sebastian

Here are some Facts about the System

The System runs with stupid SUSE Linux 7.2 and is a dual 1200 P3 with
1GB of Memory
and plenty of Disc Space. Since Suse uses a different Version System
than everyone else
in the world i can hardly tell which version runs.

xyz:/etc # mysql -V
mysql  Ver 11.15 Distrib 3.23.37, for suse-linux (i686)

# rpm -q mysql
mysql-3.23.37-58
Apache apache_1.3.27
PHP 4.3.2

my.cnf
-8<--
port= 3306
socket  = /var/lib/mysql/mysql.sock


[mysqld]
port= 3306
socket  = /var/lib/mysql/mysql.sock
skip-locking
set-variable= key_buffer=96M
set-variable= max_allowed_packet=8M
set-variable= table_cache=512
set-variable= sort_buffer=8192K
set-variable= net_buffer_length=64K
set-variable= myisam_sort_buffer_size=64M
set-variable= max_connections=200

log-bin
server-id   = 1

[mysqldump]
quick
set-variable= max_allowed_packet=16M

[mysql]
no-auto-rehash
->8--












--
MySQL General Mailing List
For 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]



RE: why me??!

2003-06-21 Thread Peter Lovatt
Hi

You need nothing or backtics - ` - around the table name - you have quotes

INSERT INTO products VALUES (153328, 2, '181150', 'noimage.gif', '154.1000',
'2003-06-20 23:03:00', NULL, '-00-00 00:00:00', '0.00', 1, 1, 1, 0);

also better to state the field names - if you add or remove a field this
query will throw an error

INSERT INTO `products`
(`products_id`
,  `products_quantity`
,  `products_model`
,  `products_image`
,  `products_price`
,  `products_date_added`
,  `products_last_modified`
,  `products_date_available`
,  `products_weight`
,  `products_status`
,  `products_tax_class_id`
,  `manufacturers_id`
,  `products_ordered`
) VALUES (
1153328
,  2
,  '181150'
,  'xx'
,  '152.3350'
,  '2003-06-20 11:11:11'
,  '-00-00 00:00:00'
,  '-00-00 00:00:00'
,  '0.00'
,  1
,  1
,  1
,  0)


HTH

Peter

-Original Message-
From: Dan Bowkley [mailto:[EMAIL PROTECTED]
Sent: 21 June 2003 20:35
To: [EMAIL PROTECTED]
Subject: why me??!


I'm trying to load a couple tons of data into a shopping cart system and for
some reason it keeps kicking back with an error.  I'm too dumb to figure out
why.  Can anyone tell me what's wrong with this code and why it doesn't
work?

INSERT INTO 'products' VALUES (153328, 2, '181150', 'noimage.gif',
'154.1000', '2003-06-20 23:03:00', NULL, '-00-00 00:00:00', '0.00', 1,
1, 1, 0);

The table itself looks like this
CREATE TABLE `products` (
  `products_id` int(11) NOT NULL auto_increment,
  `products_quantity` int(4) NOT NULL default '0',
  `products_model` varchar(12) default NULL,
  `products_image` varchar(64) default NULL,
  `products_price` decimal(15,4) NOT NULL default '0.',
  `products_date_added` datetime NOT NULL default '-00-00 00:00:00',
  `products_last_modified` datetime default NULL,
  `products_date_available` datetime default NULL,
  `products_weight` decimal(5,2) NOT NULL default '0.00',
  `products_status` tinyint(1) NOT NULL default '0',
  `products_tax_class_id` int(11) NOT NULL default '0',
  `manufacturers_id` int(11) default NULL,
  `products_ordered` int(11) NOT NULL default '0',
  PRIMARY KEY  (`products_id`),
  KEY `idx_products_date_added` (`products_date_added`)
) TYPE=MyISAM AUTO_INCREMENT=30 ;

and I myself look like http://www.dibcomputers.com/images/headbang.gif at
the moment. ;)

TIA!



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



RE: selecting DISTINCT and COUNT in MySQL

2003-06-14 Thread Peter Lovatt
Hi


SELECT
COUNT(DISTINCT trEmail ) as clicks
, trEmail  FROM table
GROUP BY trEmail
ORDER BY clicks DESC

will probably give what you are looking for


Peter

-Original Message-
From: Tim Thorburn [mailto:[EMAIL PROTECTED]
Sent: 15 June 2003 00:14
To: [EMAIL PROTECTED]
Subject: selecting DISTINCT and COUNT in MySQL


Hi,

I'm setting up a small tracking program for a site I'm working on -
basically it monitors all external web and email links that are clicked
from our site and stores them into a MySQL database.

Now I'm trying to extract the information from the database and display it
on screen with PHP.  I've made a query which reads:
SELECT DISTINCT trEmail FROM db-name;

This clearly selects all the distinct email addresses from my table, but I
would like to put a count beside each of the distinct addresses to show how
many times each link was clicked.

For example, I'd like it to look something like the following:

email address   # sent
[EMAIL PROTECTED]  12

Meaning that the email addresses '[EMAIL PROTECTED]' was clicked a total of 12
times.

I'm thinking there should be a way to do this with a single SQL query ...
although after most of the day of trying and searching google - I've come
up with nothing but a headache.

Any thoughts?

Thanks
-Tim



--
MySQL General Mailing List
For 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]



RE: Which database?

2003-06-10 Thread Peter Lovatt
smaller userbase and no commercial support *combined* mean fewer sources of
support. With MySql, support from this *superb* MySQL list :) and MySql  AB
is likely to be better than Postgres support.

Open source support (free or paid for) in general seems to be better than
closed source equivalents

Peter


-Original Message-
From: Roman Neuhauser [mailto:[EMAIL PROTECTED]
Sent: 10 June 2003 14:43
To: [EMAIL PROTECTED]
Subject: Re: Which database?


# [EMAIL PROTECTED] / 2003-06-10 14:11:39 +0100:
> (...) lack of commercial support company means you are unlikely to get
> the same level of support.

unlikely? perhaps. but...

how many OS programs do you use, how many of them have commercial
support, and how do those that have compare to those that don't?

is the help and expertise provided e. g. by [EMAIL PROTECTED]
any worse than that of this list? I would disagree.

--
If you cc me or remove the list(s) completely I'll most likely ignore
your message.see http://www.eyrie.org./~eagle/faqs/questions.html

--
MySQL General Mailing List
For 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]



RE: Column or Table issue

2003-06-10 Thread Peter Lovatt
Hi

can you post the form/php code

Peter

-Original Message-
From: Steve Marquez [mailto:[EMAIL PROTECTED]
Sent: 10 June 2003 14:26
To: MySQL List
Subject: Column or Table issue


I am attempting to insert an article into a MySQL table on a remote server,
via a PHP Forms script.

I am able to insert the article on my server, and PHP MyAdmin works on both
servers, however, when I use my script on the remote server it does not
allow for long articles. (The articles have not more than 5 paragraphs at
the most.)

Is there anyone that has run into this problem before? Any suggestions?

I am assuming that because PHP MyAdmin works with the long article that it
is my script that is the issue.

The table is a "longtext" table. All permissions are correct. The exact same
script works perfectly on my server.

The funny thing is that every "single line" text field inserts into the DB,
however, the multi line does not.

If I write a few lines in the field, it will write to the DB, if I write the
full article, it does not. It sounds like a limitation on the column. But I
have no limitations on the column. (The column is long text, besides, I can
manually insert in, or us PHP MyAdmin to place the entire article.)

This is really strange... Can anyone help?

-Steve Marquez
[EMAIL PROTECTED]


--
MySQL General Mailing List
For 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]



RE: Which database?

2003-06-10 Thread Peter Lovatt
Hi

I would echo that support is probably the most important aspect of your
choice.

Unless you have a particularly technically demanding application that needs
features only found in Postgres you would be best with MySql

You can get an answer to most support questions via this list, or MySql
themselves if you have a support contract, within hours or even minutes,
from experts.

For a newbie, support can make or break a project.

I am willing to be corrected, but Postres smaller userbase and lack of
commercial support company means you are unlikely to get the same level of
support.


Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 10 June 2003 14:04
To: [EMAIL PROTECTED]
Cc: Kaarel; [EMAIL PROTECTED]
Subject: Re: Which database?





> Actually, the license might turn out to be your biggest problem,
> especially if arter six months of development it turns that you
> either have to pay for MySQL or rewrite your application using
> another database. Note that I don't know the MySQL AB pricing
> scheme, and I'm sure it'd be a fraction of what you'd have to pay
> for Informix or Oracle at worst. :)

Check the prices - about 2 orders of magnitude less than Oracle. Frankly,
if you are doing real commercial work, MySQL's license is so trivial
as to be unnoticable.

To answere the original question, I explain the difference between MySQL
and
PostgreSQL by analogy:

MySQL is an offroad vehicle - simple, powerful, indestructible.
PostgreSQL is a limousine - very highly featured, but not as fast and not
as rugged.

Which you need depends upon your application.

One thing I would say in favour of MySQL if you are doing commercial work
is that the support is excellent - both community support via this list and
the paid-for support from MySQL AB. I don't think PostgreSQL has a
support company at the moment; I couldn't comment on its community support.
But if I were starting a new project at the moment, that alone would swing
me
to MySQL.

  Alec



--
MySQL General Mailing List
For 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]



RE: update statement, error free but no affected rows?

2003-06-06 Thread Peter Lovatt


-Original Message-
From: Christian Calloway [mailto:[EMAIL PROTECTED]
Sent: 05 June 2003 18:32
To: [EMAIL PROTECTED]
Subject: RE: update statement, error free but no affected rows?

update students
set
counselor_id = 1 ,
school_attending='Univsity of Maryland'
where id = 1;


I think

Peter



-Original Message-
From: Christian Calloway [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 1:13 PM
To: '[EMAIL PROTECTED]'
Subject: update statement, error free but no affected rows?

Hello,

I am experiencing some strangeness that I've never ran into before. On
an update statement, like:

update students set counselor_id = 1 and school_attending='Univsity of
Maryland' where id = 1;

I have no errors generated with the query, but the affected rows reads
0? This is not duplicate data, and even if I change the data around, the
query appears to go through, but no affected rows. I got around the
problem by writing a separate query for each field, but that sucks. All
of my queries are going through the PHP, so I guess, through the PHP
native MySQL functions. Any ideas?



Christian Calloway, Web Developer
[EMAIL PROTECTED]
Antharia, LLC | TDS Interactive
www.antharia.com
www.tdsinteractive.com
301-982-7358
775-218-4603 (fax)
 
WHERE DESIGN MEETS TECHNOLOGY!



--
MySQL General Mailing List
For 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]



RE: Mysql / PHP image link problem.

2003-06-04 Thread Peter Lovatt
';

?>

Peter

-Original Message-
From: Becoming Digital [mailto:[EMAIL PROTECTED]
Sent: 03 June 2003 20:57
To: [EMAIL PROTECTED]
Subject: Re: Mysql / PHP image link problem.


FWIW, there is a PHP-DB mailing list that might prove more helpful to you.
I
know certain folk on both lists can get mighty annoyed when an off-topic
question is posted, so I thought I'd give you a heads-up.
[EMAIL PROTECTED]

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message -
From: "Daniel Crompton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, 03 June, 2003 14:20
Subject: Mysql / PHP image link problem.


I have a mysql table column called 'imagecolumn'  The rows contain links
i.e.

image.gif
image.gif
null
image.gif
image.gif

To display in my web page im using:



This displays the above images in my html page

The problem i have is where the field in my table is left blank (null), a
web
browser shows this as a broken image link icon.  i.e. it doesn't ignore it.

Does anyone know how I can get my page to ignore it if there is no link.







--
MySQL General Mailing List
For 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]



RE: MYSQL DB PROBLEM

2003-06-02 Thread Peter Lovatt
Hi

This is a bug. You can fix it by adding a line to my.cnf. Can't remember
what but search the archives as it has appeared before.

Peter

-Original Message-
From: Nick Arnett [mailto:[EMAIL PROTECTED]
Sent: 01 June 2003 15:54
To: [EMAIL PROTECTED]
Subject: RE: MYSQL DB PROBLEM


> -Original Message-
> From: Adam Murphy [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 31, 2003 10:48 PM
> To: [EMAIL PROTECTED]
> Subject: MYSQL DB PROBLEM
>
>
>
> I am trying to insert a table ibf_posts
>
> into a localhost database using the MYSQL control center every
> time i try to insert that one table i get an error
>
> [forum] ERROR 2013: Lost connection to MySQL server during query

Are you trying to insert a lot of data at once?  If so, that will produce
this error if it exceeds a certain size.  The solutions are to insert fewer
records at once or increase MAX_ALLOWED_PACKET, if I recall the correct
variable.

Nick


--
MySQL General Mailing List
For 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]



RE: Help NEWBIE!

2003-06-01 Thread Peter Lovatt
Hi

var/lib/mysql/mysql.sock

is created when MySQl runs, it may be a permissions problem with the
directory - does MySql have write permission for this directory

Peter

-Original Message-
From: Vishal Thakur [mailto:[EMAIL PROTECTED]
Sent: 01 June 2003 10:37
To: ABHIJIT NAIK
Cc: MySQL; SuSE
Subject: Re: Help NEWBIE!


re-install mysql, it wont work without mysql.sock.


On Sun, 2003-06-01 at 01:04, ABHIJIT NAIK wrote:
> Dear Friends,
>
> I am new user of MySQL and whenever I type mysql to start the ware it
> simply states -- Can't connect to local MySQL server through socket
> 'var/lib/mysql/mysql.sock'. I know I am doing something very wrong here
> and mabe some of you might be able to help me solve this problem.
>
> I am running a SuSE Linux 8.2 version AMD Duron machine and already have a
> subscription to my ISP to access their database.
>
> ALso, the file mysql.sock does not exist in the mysql folder.
>
> Thanking you all very much for your kind help.
>
> Sincerely,
> ABHIJIT NAIK
>
>


--
MySQL General Mailing List
For 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]



RE: [My Solution] Re: Mailing Labels from MySQL database on web

2003-05-28 Thread Peter Lovatt
Hi

One more suggestion that does work reasonably well.

Generate a basic HTML page with a table laid out to suit the labels, in php,
with addresses in place
Write the page to your webspace as labels.htm (you will need to set
permissions to allow this)

You then need a program that will open and print HTML pages (From experience
MS Word will, and there will be plenty of others too )

then in your php




The above is for Word, substitute .doc for a file type associated with your
program, or invent one and associate it with your program. Again tested
under Windoze, and I should think it will work under other o/s

The doc will then open in the program, correctly laid out ready for
printing.

No special software, or techiness needed

I only did single pages, might need some playing with to make it work with
multiple pages

Also works for any sort of mailmerge, or reports. I only had it working with
text and table borders. Be interested in anybody trying it and making it
work with images and multiple pages.

HTH


Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---




-Original Message-
From: Landy Atkinson [mailto:[EMAIL PROTECTED]
Sent: 28 May 2003 13:40
To: [EMAIL PROTECTED]
Subject: [My Solution] Re: Mailing Labels from MySQL database on web


Thanks for all the ideas.  Here is a list of the basic paths
suggested along with the comments given for each method.  Nobody
claimed any of these was really good and hoped someone would suggest
a better approach.

1. Use MS Word's mail merge and MS Query with MyODBC as the data source.
 - Only good for Windows & MacOSX and requires fairly high end user
   knowledge to download and install MyODBC and set up MS Query.

2. Use PHP to generate VBScript to control MS Word.
 - Difficult to set up.

3. Use PHP to build a PDF on the server in the proper Avery label format.
 - Nobody suggested a PDF file builder for PHP, but suggested there
   were cgi-scripts available for this purpose.

4. Use one of the reporting packages which can be found at sites like
freshmeat.net or sourceforge.net, but nobody responding had tried
this.
 - Nobody suggested a particular package or stated how well this
   might work.

5. Use PHP to create the CSV file and present it as an HTTP
right-click download link on the web page.
 - This might be a good solution which could work with most
   any word processor.

6. Use PHP to dynamically produce an HTML page formatted to
work with your labels and print it right from there.
 - Dependent upon which browser and printer is being used, i.e. not
   very device independent.

Number 1 & 5 seemed like the best of what was suggested for my
purposes.  I decided to take path #1 and it seems to work pretty
well.  I've written up instructions for the end user to follow and
will give it a try as soon as I get MySQL permissions straightened
out.  It turns out my ISP sets up only an admin user for the MySQL
database on our site and this user does not have GRANT privileges.
Mailing label printing works fine when MyODBC is set up using the
admin account.  I have a Support Ticket in with my ISP to create a
couple of users with only the necessary privileges.  Once this
happens, I will pass it on the the Club Secretary and see if this is
really a workable solution.

-Landy

>
>- Original Message -
>From: "Landy Atkinson" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, May 27, 2003 2:25 PM
>Subject: Mailing Labels from MySQL database on web
>
>
>>  I have a club roster database set up on our web site in which the
>>  underlying data is in a MySQL database.  I am using PHP to access the
>>  data and display it on a web page as a phone list, e-mail list,
>  > directory etc.  Now what I need is to give the club secretary a way
>  > to print mailing labels.
>>
>>  What is the best way to approach this?  As a temporary measure, I
>  > used an auxiliary program (MySQL-Front running on a Windows PC) to
>  > create a CSV file which I e-mailed to the secretary along with
>  > instructions on how to use the file in mail merge document in MS Word
>>  to create labels.  I thought about writing PHP code to create a CSV
>>  formatted output on a web page which the secretary could copy and
>>  paste into a document for the mail merge, but it seems there should
>>  be a better way.
>>
>>  Any suggestions?
>>
>>  -Landy
>>
>>  --
>>  MySQL General Mailing List
>>  For 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]




-- 
MySQL General Mailing List
For list archiv

RE: Nested SQL QUERY

2003-03-29 Thread Peter Lovatt
HI

MySQL does not support sub selects/nested queries :(

Peter

-Original Message-
From: Eric Leupold [mailto:[EMAIL PROTECTED]
Sent: 29 March 2003 16:43
To: [EMAIL PROTECTED]
Subject: Nested SQL QUERY


I hope someone can help me with a syntax error I'm getting with a nested
query.  I'm a newbie.

Here is the statement:

SELECT *
FROM tblmarkets
WHERE MarketID IN
 (SELECT MarketID
 FROM tblmarketproducts, tblproducts
 WHERE tblmarketproducts.ProductID = tblproducts.ProductID AND
ProductName = 'Apples')
ORDER BY MarketName

and I'm getting the following error message:

"You have an error in your SQL syntax near 'SELECT MarketID
 FROM tblmarketproducts, tblproducts
 WHERE tblmarke' at line 4"

I have 3 tables - tblmarkets, tblmarketproducts, and tblproducts.  I am
trying to return the columns in tblmarkets based on the value of 'Apples'
(test value for a form variable).  MarketID is the primary key in tblmarkets
which is related to MarketID in tblmarketproducts. The second column in
tblmarketproducts is ProductID which is related to ProductID in tblproducts.
The other column in tblproducts is ProductName which is the initial form
variable the query is based upon ('Apples' is the test variable for the
statement').

I have also tried a nested INNER JOIN statement:

SELECT tblMarkets.*, tblMarketProducts.*, tblProducts.ProductName
FROM tblProducts INNER JOIN (tblMarkets INNER JOIN tblMarketProducts ON
tblMarkets.MarketID = tblMarketProducts.MarketID) ON tblProducts.ProductID =
tblMarketProducts.ProductID
WHERE tblMarkets.ProductID = varProductID and MarketName LIKE 'varName%' AND
City Like 'varCity%' AND State LIKE 'varState%' AND County LIKE 'varCounty%'
AND Zip LIKE 'varZip%' AND Approved = '1'
ORDER BY MarketName

and get a syntax error in line 2.

I am at a loss and would ve grateful for any help.


Eric Leupold



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



RE: CREATE syntax wrong?

2003-03-24 Thread Peter Lovatt
Hi

AUTO_INCREMENT needs to be an integer, NUMERIC is a decimal?

not 100% sure but it looks like it

Peter

-Original Message-
From: Cesar Baquerizo [mailto:[EMAIL PROTECTED]
Sent: 24 March 2003 20:59
To: MySQL
Subject: CREATE syntax wrong?


Hello,

I am on:

mysql  Ver 11.18 Distrib 3.23.54, for pc-linux (i686)


Is there any reason the following should not work:

CREATE TABLE category
(
  category_id NUMERIC NOT NULL AUTO_INCREMENT,
  category_name VARCHAR(40),
  description VARCHAR(80),
  PRIMARY KEY (category_id)
) TYPE=MyISAM;

I get this:

ERROR 1063 at line xx: Incorrect column specifier for column
'category_id'


-- 

---
Cesar Baquerizo
Off. - 718.343.0829
Fax. - 718.343.3111
Cell - 917.685.8447




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



RE: Can't start mysql

2003-03-01 Thread Peter Lovatt
hi

have you run mysql_install_db ?

this sets up the mysql database initially

Peter

-Original Message-
From: John Almberg [mailto:[EMAIL PROTECTED]
Sent: 01 March 2003 20:44
To: [EMAIL PROTECTED]
Subject: Can't start mysql


I'm trying to install MySQL 3.23 on a RedHat Linux Version 8.0 box using
RPMs. The install seems to go well, but the log file contains:

mysqld: Can't find file: './mysql/host.frm'

>From the docs, I understand this happens because I haven't set up the grant
tables, but how can I do that if I can't start the database? Seems like a
Catch-22 situation!

When I try to start MySql manually, using safe_mysqld, I get the same error
in the error log. I'm sure I'm missing something simple, but I've been
banging my head against this for awhile and can't figure it out. Any help
much appreciated.

Brgds: John

--
Identry, LLC
Northport, NY 11768

Ph: 631.754.8440
Fx: 631.980.4262
Em: [EMAIL PROTECTED]

Member: Long Island Web Developers Guild

<><><><><><><><><><><><><><><><><><><><><><><><>
Visit us at: www.identry.com
Take control of your Web site
<><><><><><><><><><><><><><><><><><><><><><><><>




-
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



RE: Query with php

2003-03-01 Thread Peter Lovatt

$result=mysql_query("SELECT
items.*, city.City
FROM
items, city
WHERE
items.Category='$Category'
AND items.CityID='$CityName'
AND items.CityID=21
ORDER BY
City
");

while ($row=mysql_query($result)) {   <==this is a/the problem, I think,
wrong function :)

$CityName=$row['0'];
$CityID=$row['1'];
}


should be

$result=mysql_query("SELECT
items.*, city.City
FROM
items, city
WHERE
items.Category='$Category'
AND items.CityID='$CityName'
AND items.CityID=21
ORDER BY
City
");

while ($row=mysql_fetch_row($result)) {   <== should be

$CityName=$row['0'];
$CityID=$row['1'];
}



-Original Message-
From: Andrew [mailto:[EMAIL PROTECTED]
Sent: 01 March 2003 11:55
To: MySQL-Lista
Subject: Query  with php


Dear Mysql guru's

I have a sneaky suspision that the my current problem is related!

I want to display

There are '$number of records' in '$the city you have selected'

However this is proving to be beyond my brains capacity to deal with :p

So,if any of you can spot what the obvious mistakes I am making I would
appreciate it very much.  This is the situation and schema.

form selects city and category:



 
  Select City and Business

 



 


  
  

";

$result=mysql_query("SELECT City, CityID FROM city ORDER BY City");
while ($row = mysql_fetch_array($result))
{
$city_id=$row['CityID'];
$city=$row['City'];
echo " $city ";
}
echo "";
?>

";

$result=mysql_query("SELECT Category, CategoryID FROM category ORDER BY
Category");
while ($row = mysql_fetch_array($result)) {
echo " $row[Category] ";
}
echo "";
?>

 



 
  
   










 

   
  
 



resluts appear here:




 
 


   




";

/* Image will END here */
?>






 $IN ";
echo "";

echo "";

echo "";
echo "";
echo "";
echo "$IN";

echo "a: $Caddress";
echo "a: $Ctown";

echo "p: $CpostC";
echo "t: $Ctele ";

echo "";

echo "";
echo "";
echo "";
echo "";
echo "\n\n";



echo "";

}

?>




It ius this thats casuiing the headache:  and I think it is related to not
having a selected clause in the resulte


   



???
Andrew



-
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



RE: FAQ hosting site (was "Re: An Idea")

2003-01-01 Thread Peter Lovatt
Hi

I was looking for a reasonably heavyweight php application, there are some
lightweight ones and some half finished ones and some perl ones, but none
that were what I was looking for.

Any suggestions would be appreciated, no point in reinventing the wheel.

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]]
Sent: 02 January 2003 00:37
To: Peter Lovatt
Cc: Stefan Hinz, iConnect (Berlin); David T-G; mysql users
Subject: Re: FAQ hosting site (was "Re: An Idea")


On Wed, Jan 01, 2003 at 11:08:58PM -0000, Peter Lovatt wrote:
>
> I am not sure if there is existing faq software (I've checked
> sourceforge and freshmeat without much luck)

Really?

That's a wheel I've seen re-invented many times.  I know there's stuff
out there.
--
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 17 days, processed 617,666,871 queries (401/sec. avg)



-
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: FAQ hosting site (was "Re: An Idea")

2003-01-01 Thread Peter Lovatt
Hi

Is '111' the IP it is trying to connect on?

If so it is an invalid IP.

If the IP is valid how are you trying to connect?

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: mnbv [mailto:[EMAIL PROTECTED]]
Sent: 02 January 2003 00:23
To: Peter Lovatt; Stefan Hinz, iConnect (Berlin); David T-G; mysql users
Subject: RE: FAQ hosting site (was "Re: An Idea")


I really need your help, I installed MySQL and I can
connect to it through localhost but when trying to
access it from outside I get:

ERROR 2003: Can't connect to MySQL server on 'IP'
(111)

Any suggestions?

Someone suggested that the problem is because the
server has 2 nics (2 ips set up).

Does anyone know a solution for this?


--- Peter Lovatt <[EMAIL PROTECTED]> wrote:
> Hi
>
> Like the look of the way its taking shape.
>
> I am not sure if there is existing faq software
> (I've checked sourceforge
> and freshmeat without much luck) we could use, or if
> someone can do a better
> job :) but I have a content management system
> written, together with a lot
> of the search functionality needed for the faq. It
> can mix database stored
> content with static content, so it would probably do
> the job with a little
> work. It also does the membership
> authorisation/management.
>
> I'd be happy to build the software, if that helps.
>
> Let me know
>
> Peter
>
> ---
> Excellence in internet and open source software
> ---
> Sunmaia
> Birmingham
> UK
> www.sunmaia.net
> tel. 0121-242-1473
> International +44-121-242-1473
> ---
>
> -Original Message-
> From: Stefan Hinz, iConnect (Berlin)
> [mailto:[EMAIL PROTECTED]]
> Sent: 01 January 2003 21:26
> To: David T-G; mysql users
> Subject: Re: FAQ hosting site (was "Re: An Idea")
>
>
> David,
>
> > Sure; it's the least I can do.  Look for
> mysql.justpickone.org to be
> in
> > the DNS tables by tomorrow.  By then the
> [EMAIL PROTECTED]
> > mailing list will be ready for subscriptions, too.
>
> Fine. http://mysql.justpickone.org/ works :)
>
> > Now, what do we need to do to be able to update
> this FAQ?  I can't
> create
> > ssh accounts for everyone, but we might arrange
> ftp
>
> Let's set up a PHP thing with MySQL. That's quite
> fast and easy to do. I
> could contribute some code.
>
> My suggestions (database design):
>
> 1. We need an authors table, and everyone who wants
> to be an author
> (contributor) can mail you, and you will set up
> accounts for these
> persons. The authors table will, of course, be used
> for database
> authentification / to update the admin pages.
>
> 2. For the actual content, we will need only one
> table, with question
> (varchar), answer (text), timestamp and a couple of
> id's that refer to
> other tables.
>
> 3. For the beginning, I would suggest we only have
> two more tables:
> category (installation, privilege system, ...,
> generally speaking, the
> main chapters of the manual) and difficulty
> (beginner, advanced,
> expert). _Not_ to be edited by the authors, to keep
> the FAQ smooth and
> simple.
>
> - We can make this more complex when necessity
> comes, with ratings,
> automated checks for double entries etc.
>
> My suggestions (frontend):
>
> 1. For end users, a very simple search. As Jim
> (JamesD) pointed out,
> Alkaline could do the job. Then again, Alkaline will
> search (and before,
> index) documents, and not databases. For the
> beginning, I would prefer
> just a simple input box for the search.
>
> 2. Output preferably as html files, i.e. nothing
> like
>
"index.php?cat=installation&difficulty=beginner&searchterm=windows",
> but
> rather something like
> "/installation/beginner/windows/1.html". IMHO,
> this is easier to refer to in a mailing list, and
> easier to click. Maybe
> we can set up Alkaline on those html files, as an
> alternative search for
> the database search.
>
> 3. Authors should be instructed to first search via
> the end user
> interface before inserting a new entry. If they do
> want to insert
> something new, they should simply select category,
> difficulty, paste the
> question, type (or paste) the answer.
>
> 4. The author login shoul

RE: FAQ hosting site (was "Re: An Idea")

2003-01-01 Thread Peter Lovatt
Hi

Like the look of the way its taking shape.

I am not sure if there is existing faq software (I've checked sourceforge
and freshmeat without much luck) we could use, or if someone can do a better
job :) but I have a content management system written, together with a lot
of the search functionality needed for the faq. It can mix database stored
content with static content, so it would probably do the job with a little
work. It also does the membership authorisation/management.

I'd be happy to build the software, if that helps.

Let me know

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: 01 January 2003 21:26
To: David T-G; mysql users
Subject: Re: FAQ hosting site (was "Re: An Idea")


David,

> Sure; it's the least I can do.  Look for mysql.justpickone.org to be
in
> the DNS tables by tomorrow.  By then the
[EMAIL PROTECTED]
> mailing list will be ready for subscriptions, too.

Fine. http://mysql.justpickone.org/ works :)

> Now, what do we need to do to be able to update this FAQ?  I can't
create
> ssh accounts for everyone, but we might arrange ftp

Let's set up a PHP thing with MySQL. That's quite fast and easy to do. I
could contribute some code.

My suggestions (database design):

1. We need an authors table, and everyone who wants to be an author
(contributor) can mail you, and you will set up accounts for these
persons. The authors table will, of course, be used for database
authentification / to update the admin pages.

2. For the actual content, we will need only one table, with question
(varchar), answer (text), timestamp and a couple of id's that refer to
other tables.

3. For the beginning, I would suggest we only have two more tables:
category (installation, privilege system, ..., generally speaking, the
main chapters of the manual) and difficulty (beginner, advanced,
expert). _Not_ to be edited by the authors, to keep the FAQ smooth and
simple.

- We can make this more complex when necessity comes, with ratings,
automated checks for double entries etc.

My suggestions (frontend):

1. For end users, a very simple search. As Jim (JamesD) pointed out,
Alkaline could do the job. Then again, Alkaline will search (and before,
index) documents, and not databases. For the beginning, I would prefer
just a simple input box for the search.

2. Output preferably as html files, i.e. nothing like
"index.php?cat=installation&difficulty=beginner&searchterm=windows", but
rather something like "/installation/beginner/windows/1.html". IMHO,
this is easier to refer to in a mailing list, and easier to click. Maybe
we can set up Alkaline on those html files, as an alternative search for
the database search.

3. Authors should be instructed to first search via the end user
interface before inserting a new entry. If they do want to insert
something new, they should simply select category, difficulty, paste the
question, type (or paste) the answer.

4. The author login should be extremely convenient, with a persistent
cookie, so an author will not actually have to login more than once
(from the same browser/machine).

5. An author should be able to insert new content and to update his /
her own content, nothing else.

- What I said about database design applies to the frontend, too. We can
make it more complex later on, when the need arises. We can have user
contributed notes, fine grained search criteria, etc. In the beginning,
I would suggest to follow the KISS principle (keep it simple & stupid).

I send this to the list, because

a) maybe someone has written exactly what we want, or can give a URL to
where to find it,

b) maybe someone has better ideas or comments on this.

> By then the [EMAIL PROTECTED]
> mailing list will be ready for subscriptions, too.

Great. We should discuss everything else via this list, then.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "David T-G" <[EMAIL PROTECTED]>
To: "mysql users" <[EMAIL PROTECTED]>
Cc: "Stefan Hinz, iConnect (Berlin)" <[EMAIL PROTECTED]>
Sent: Wednesday, January 01, 2003 4:12 PM
Subject: Re: FAQ hosting site (was "Re: An Idea")


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Stefan, et al --
>
> ...and then Stefan Hinz, iConnect (Berlin) said...
> %
> % David,
> %
> % > see it dropped if they don't jump on it at the start.
> %
> % I agree. Will you set it up at http://justpickone.org/? (BTW, I like
>
> Sure; it's the least I can do.  Look for mysql.justpickone.org to be
in
> the DNS tables by tomorrow.  By then the
[EMAIL PROTECTED]
> mailin

RE: An Idea

2002-12-31 Thread Peter Lovatt
Hi

A faq without questions would be  pretty empty!

While you have the questions why not keep a note (or send them to me) Once
we have some momentum we can put some answers and tutorials together.

I thought I would email MySql to see if they like the idea, if not then I
will build it.

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]]
Sent: 31 December 2002 11:13
To: mysql users
Cc: Stefan Hinz, iConnect (Berlin)
Subject: Re: An Idea


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stefan, et al --

...and then Stefan Hinz, iConnect (Berlin) said...
%
% > So (taking a deep breath !) I would be prepared to lay the foundations
...
%
% Thanks, I appreciate that. I've been waiting a moment before answering,
% waiting for others to take a deep breath and say "yes", too, but it
% seems you are the only one.

I'd love to contribute, but not only am I very busy but also very new.  I
could probably contribute a lot of *questions*, but this FAQ is probably
meant to also have *answers* :-)


%
% > [James: ] $44.99 SRP  - a low cost compared to the 'deep breath" below
% :-)
%
% I know there are good books, and I especially like Paul's books on
% MySQL. There are good books by German authors on MySQL, too.

I'm happy to hear of it; I may have to go out and pick it up!


%
% But, then again, refering to books will bring up the same sort of
% answers people on this list are complaing about ("hey, stupid, go buy
% book xyz and read it before asking silly questions"). With a FAQ, this

Well, it would be nice to have a listing of readers' favorite and most
helpful books so that newbies know *what* to go and pick out, for one
thing; I don't think that book references are all bad!


% could be "You will find the answer for your question at
% www.mysql.com/faq/answer_xyz.html".

Yes; that's very good.


%
% > So, any thoughts? Where do we go from here?
%
% Nowhere, I suppose :(

Wait; quite on the contrary!  I think that good work can start (granted,
it would probably start faster if I jumped in to contribute more, but...)
right now!


%
% Maybe some of the folks at MySQL AB will read this and come up with a
% database structure for the FAQ on MySQL.com and user accounts for you
% and me (and maybe others, once this thing has started).

Why should it have to be there?  Let anyone with a site set it up and get
it going and see if readers will even care about it, and *then* perhaps
have it move to mysql.com later...


%
% Regards,
% --
%   Stefan Hinz <[EMAIL PROTECTED]>
%   Geschäftsführer / CEO iConnect GmbH 
%   Heesestr. 6, 12169 Berlin (Germany)
%   Tel: +49 30 7970948-0  Fax: +49 30 7970948-3


HTH & HAND & Happy Holidays

mysql query,
:-D
- --
David T-G  * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+EXu2Gb7uCXufRwARAq2QAJ49JlM22lxrMndZLWf9BFzRvlrWQgCfU/LP
M/PviclU9pDOmcKXOgmSPp8=
=1os1
-END PGP SIGNATURE-

-
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




RE: An Idea

2002-12-29 Thread Peter Lovatt
Hi

I think the two would serve different purposes. Paul's book is a best friend
but.

It may take 2-3 days to get a copy (unless you live in a good technical
bookshop) and often people want an answer now.

Although it's good value, not everyone (casual users, students, newbies
making their first steps) will be able or want to pay over $40 for a
book (though I agree it is good value if you do)

Peter



---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: JamesD [mailto:[EMAIL PROTECTED]]
Sent: 30 December 2002 01:35
To: Peter Lovatt; [EMAIL PROTECTED]
Subject: RE: An Idea


while Paul probably wouldnt say it, I would:

his book: "MySql and Perl for the Web" ISBN 0-7357-1054-6 "New Riders
Publishing"
answers the questions you are getting at below, and
IMHO the book is excellent as a "how do i get started..." and more...

$44.99 SRP  - a low cost compared to the 'deep breath" below :-)

like any book, to drive through it all the way, inch
by inch, and learn, takes some time and focus.

James Danforth,COO
Neovi Data Corp
www.qchex.com


-Original Message-
From: Peter Lovatt [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 29, 2002 4:18 PM
To: Stefan Hinz, iConnect (Berlin); Cal Evans; Paul DuBois; Adam
Wi´ckowski; [EMAIL PROTECTED]
Subject: RE: An Idea


Hi

My first thought was that the docs on mysql.com should do the job, but,
although they answer most technical questions, often more down to earth
stuff like 'How do I store images' or 'how do I get started with SQL' isn't
there, or it is difficult to find.

The other problem is that the documentation is often technical to point that
it is difficult to understand, even as a reasonably competent database
programmer. I think newbies (and not so newbies) could feel totally
overwhelmed by much of it.

So (taking a deep breath !) I would be prepared to lay the foundations for a
faq / knowledge base aimed specifically at this type of questions and to
manage it.

So, any thoughts? Where do we go from here?

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: 29 December 2002 22:01
To: Cal Evans; Paul DuBois; Adam Wi´ckowski; [EMAIL PROTECTED]
Subject: Re: An Idea


Cal, Paul, dear list,

thank you, Cal, for your wise words ...

> "Here's the FAQ we developed so you don't have to waste our time
asking
> questions that have already been answered."

Go to MySQL.com and type "FAQ" in the search box. This will provide 71
results, some of them with valuable FAQ-like information, but no real
FAQ.

Instead, we have this in every list mail:

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

I would keep this shorter, saying "Believe in God and do not sin" ;-)

But seriously: Anybody here interested in setting up a FAQ on MySQL.com
/ MySQL.de,
- with "silly" common questions from this list,
- and with answers in "small tutorial" format (something like
http://www.mysql.com/articles/dotnet/index.html),
- well organized (one person to collect / insert the "silly" questions),
- easy to search (only search term + search by category),
- easy to maintain (e. g. with user comments, like the English manual),
- even easier to use as a referer than the MySQL manual when answering
questions?

Flame me if there _is_ a FAQ like this. At least I didn't find it at
MySQL.com, which is most probably the first place a new MySQL user would
look for it.

I am the German translator of the official MySQL manual, so I could
offer to translate as much as I can from the FAQ into German.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Cal Evans" <[EMAIL PROTECTED]>
To: "Paul DuBois" <[EMAIL PROTECTED]>; "Adam Wi´ckowski"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, December 29, 2002 6:00 PM
Subject: RE: An Idea


> Because that's the way that (FoxPro, Access, Paradox, insert name of
> favorite desktop RDBMS here) did it and I can't make the jump to a
real
> server based RDB

RE: An Idea

2002-12-29 Thread Peter Lovatt
Hi

My first thought was that the docs on mysql.com should do the job, but,
although they answer most technical questions, often more down to earth
stuff like 'How do I store images' or 'how do I get started with SQL' isn't
there, or it is difficult to find.

The other problem is that the documentation is often technical to point that
it is difficult to understand, even as a reasonably competent database
programmer. I think newbies (and not so newbies) could feel totally
overwhelmed by much of it.

So (taking a deep breath !) I would be prepared to lay the foundations for a
faq / knowledge base aimed specifically at this type of questions and to
manage it.

So, any thoughts? Where do we go from here?

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: 29 December 2002 22:01
To: Cal Evans; Paul DuBois; Adam Wi´ckowski; [EMAIL PROTECTED]
Subject: Re: An Idea


Cal, Paul, dear list,

thank you, Cal, for your wise words ...

> "Here's the FAQ we developed so you don't have to waste our time
asking
> questions that have already been answered."

Go to MySQL.com and type "FAQ" in the search box. This will provide 71
results, some of them with valuable FAQ-like information, but no real
FAQ.

Instead, we have this in every list mail:

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

I would keep this shorter, saying "Believe in God and do not sin" ;-)

But seriously: Anybody here interested in setting up a FAQ on MySQL.com
/ MySQL.de,
- with "silly" common questions from this list,
- and with answers in "small tutorial" format (something like
http://www.mysql.com/articles/dotnet/index.html),
- well organized (one person to collect / insert the "silly" questions),
- easy to search (only search term + search by category),
- easy to maintain (e. g. with user comments, like the English manual),
- even easier to use as a referer than the MySQL manual when answering
questions?

Flame me if there _is_ a FAQ like this. At least I didn't find it at
MySQL.com, which is most probably the first place a new MySQL user would
look for it.

I am the German translator of the official MySQL manual, so I could
offer to translate as much as I can from the FAQ into German.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Cal Evans" <[EMAIL PROTECTED]>
To: "Paul DuBois" <[EMAIL PROTECTED]>; "Adam Wi´ckowski"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, December 29, 2002 6:00 PM
Subject: RE: An Idea


> Because that's the way that (FoxPro, Access, Paradox, insert name of
> favorite desktop RDBMS here) did it and I can't make the jump to a
real
> server based RDBMS!
>
> Why do you ask?  :)
>
> Seriously, I find this type of issue (not your question Paul, the
original
> question) one of the most troubling things about this list. We as a
> community of SQL developers (regardless of dialect) need to make a
more
> concentrated effort to explain the differences between desktop
databases and
> real database engines. We need to educate people making the changeover
> before releasing them into the wild. (Maybe the link to download MySql
could
> ask a few basic questions to prove you know what you are doing before
being
> allowed to download!)  :)
>
> I cut my teeth on FoxPro.  The first SQL I wrote was in the FoxPro
(2.5/6?)
> dialect. I know from whence I speak because I asked these same
questions
> many years ago.  Luckily, I found people who kindly but firmly pointed
me in
> the right direction. ("You DON'T need gapless sequences for PK's."
"You
> DON'T store images in the actual database without permission from
God."
> "Here's the FAQ we developed so you don't have to waste our time
asking
> questions that have already been answered." "Thank you, come again.")
They
> showed me the light and occasionally I try to share what little I know
with
> others.
>
> I guess what I'm trying to say is to those who know something (even if
you
> are like me and are constantly amazed at what you DON'T know) share
kindly
> and willingly. To those seeking enlightenment...RTFM you mook! Check
the
> !*#&^ archives and use Google, this issue has been beat to death!
>
> Humbly,
> =C=
> *
> * Cal Evans
> * The Virtual CIO
> * http://www.calevans.com
> *
>
>
> -Original Message-
> From: Paul DuBois [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, December 29, 2002 10:02 AM
> To: Adam Wi´ckowski; [EMAIL PROTECTED]
> Subject: Re: An Idea
>
>
> Why?
>
>
> --

RE: DBI or CGI perl error?

2002-12-14 Thread Peter Lovatt
You are missing a comma

update music
 set  cut = '' , mamended = '20021214013349' where mrecno = '1'

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Vidiot [mailto:[EMAIL PROTECTED]]
Sent: 15 December 2002 02:34
To: MySQL mail list
Subject: DBI or CGI perl error?


My database layout is as follows:

mysql> show columns from music;
+---+---+--+-+-+---+
| Field | Type  | Null | Key | Default | Extra |
+---+---+--+-+-+---+
| mrecno| int(6)|  | PRI | 0   |   |
| title | varchar(45)   |  | | |   |
| artist| varchar(30)   |  | | |   |
| source| char(1)   |  | | |   |
| peak  | int(3)| YES  | | NULL|   |
| peakdate  | date  | YES  | | NULL|   |
| entrydate | date  | YES  | | NULL|   |
| length| int(3)| YES  | | NULL|   |
| stereo| char(1)   | YES  | | NULL|   |
| cut   | tinyint(1)|  | | 0   |   |
| album | varchar(45)   | YES  | | NULL|   |
| trackno   | int(2)| YES  | | NULL|   |
| notes | varchar(40)   | YES  | | NULL|   |
| mcreated  | date  | YES  | | NULL|   |
| mamended  | timestamp(14) | YES  | | NULL|   |
+---+---+--+-+-+---+

Yet I get the following error:

Error

The Database Routines returned the following error
The reason given was:
updating music - You have an error in your SQL syntax near 'mamended =
'20021214013349' where mrecno = '1' ' at line 2
The command being executed was:

update music
 set  cut = '' mamended = '20021214013349' where mrecno = '1'

I get it when I do a web page reload.  Two things are wrong: 1) cut is
defined
as an integer, yet it is trying to store nothing, while the default is set
to zero and nothing should be attempted to the mamended field, as that is an
auto-update field from within MySQL.

The following are the RPMs that I have installed on my Linux 7.1 system:

MySQL-3.23.53a-1.i386.rpm
MySQL-Max-3.23.53a-1.i386.rpm
MySQL-client-3.23.53a-1.i386.rpm
MySQL-devel-3.23.53a-1.i386.rpm
MySQL-shared-3.23.53a-1.i386.rpm
perl-DBD-MySQL-1.2215-1.i386.rpm
perl-DBI-1.14-10.i386.rpm

The Perl CGI package was part of the Perl 5.0.6 installation.

Any pointers/suggestions will be greatly appreciated.

Thanks.

MB
--
e-mail: [EMAIL PROTECTED]  /~\ The ASCII
   \ / Ribbon Campaign
X  Against
Visit - URL: http://vidiot.com// \ HTML Email

-
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




RE: INSERT confirmation? PHP

2002-12-14 Thread Peter Lovatt
hi


mysql_insert_id

http://www.php.net/manual/en/function.mysql-insert-id.php

should do it!

Peter
---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Steve Lefevre [mailto:[EMAIL PROTECTED]]
Sent: 14 December 2002 21:28
To: [EMAIL PROTECTED]
Subject: INSERT confirmation? PHP


I'm designing a user database for PHP 4 and MySQL 3.32 or whatever.

Users enter a class and it's workshops for their students.

The 'Class' table has  fields 'Name' and 'ID'.
ID is the primary key and its an auto-incremented integer

The 'Workshop' table has a field ID, Number, ClassID, Date, etc.

The 'ClassID' should be the value of the ID field of its parent class.

After I use an insert to create the Class data, how do I get the appropriate
ClassID for the 'Workshop' table inserts? I could assume to use the very
latest one, but that *might* break, as this is a multi-user database.

Is there a way I can issue an insert statement, and get a return of the ID
value it got?


-
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




RE: Warning: Supplied argument is not a valid MySQL result resource

2002-11-28 Thread Peter Lovatt
Hi

It means you are refering to/using a result id that does not exist. Maybe
the query changed or the database is down?

Try echoing the query and the error

echo mysql_error ( [resource link_identifier])

if not could you send more details to give us a little more to go on

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: mark horn [mailto:[EMAIL PROTECTED]]
Sent: 28 November 2002 22:41
To: [EMAIL PROTECTED]
Subject: Warning: Supplied argument is not a valid MySQL result resource






Hi

I wonder if anyone can help or point me in the right direction for this
problem.

Warning: Supplied argument is not a valid MySQL result resource

I get this while running index.php, the site did work then suddenly stopped,
the index.php hasnt been changed.

Machine : Cobalt RAQ4


_
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


-
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




RE: converting from foxpro to mysql ???????

2002-11-27 Thread Peter Lovatt
Hi

Postgre might be a better bet, as it supports more of the features you are
looking for.

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: toby z [mailto:[EMAIL PROTECTED]]
Sent: 27 November 2002 15:06
To: [EMAIL PROTECTED]
Subject: converting from foxpro to mysql ???




ok guyz i need some inside info .

plz help me with:

1. there aint no foreign keys in mysql then what can i do about  cascading
updates, deletes and all


2. if i ve to conver a db in foxpro to mysql or sql which one should i
preffer and y 

3. and while im converting the foxpro db to mysql what will i ve to loose
 the common pitfalls ..


4. n finally do i have anyother choice of open source database (cheapest if
not completely free) for this conversion ?



id be eternally gratefull if anyone cud guide me thru this ..


thnx a billion zillion guyz .

toby ..


_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail


-
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




RE: i'm just missing something

2002-11-19 Thread Peter Lovatt
Look at GRANT

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Stick Dragon [mailto:[EMAIL PROTECTED]]
Sent: 19 November 2002 22:34
To: [EMAIL PROTECTED]
Subject: i'm just missing something


I been tring to read the docs on the website, and tried looking it up, but
i'm getting confused. I am trying to make a database and a user.
to make the database i use

mysql> create database dbname;

that seems to work. but how do i make a user for it?

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


-
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




RE: Does this list work??????

2002-11-18 Thread Peter Lovatt
Hi

Yes the list works!

It sounds as though you do not have support for the character set you are
using. Check the MySql manual for supported character sets.

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Siomara Pantarotto [mailto:[EMAIL PROTECTED]]
Sent: 17 November 2002 15:18
To: [EMAIL PROTECTED]
Subject: Does this list work??


Hi,

Can someone help on this question?

I have downloaded and intalled succesfully mysql-max 4.0.4. However, when I
checked the information I stored via insert statements, I noticed weird
characters placed in the positions of letter that have accents. I am storing
information in portuguese and the content stored is not exactly what I am
putting in my sql statement.

Any suggestion of what it can be?

Thanks

Siomara



_
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail


-
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




RE: access denied 1045

2002-11-16 Thread Peter Lovatt
Hi

Cobalt uses 'cobalt-mysql' as the default mysql root password. I spent hours
trying to sort this one out, reinstalled the whole thing, manually recreated
Mysql database all sorts

Stupid to use non standard setup really.

If that doesn't work come back to me.

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Zinneken [mailto:[EMAIL PROTECTED]]
Sent: 16 November 2002 10:31
To: [EMAIL PROTECTED]
Subject: access denied 1045


I'm completely new to mysql. I've been hunting all over the web and
mysql help/documentation but could not find a working solution to my
problem.

I installed mysql on a RAQ4 from the standard package that came from
Cobalt. I was able to set the root@host password, but unable to set
the root@localhost password and I beleive this is the source of my
proble.

When trying to do anything password related mysql I get errors "ERROR
1045: Access denied for user: 'root@localhost'"
The errors start at the basic basis: shell> mysql -u root test

Having looked at the help pages it seems (thanks to Joerg Prante for
his comment on the relevant mysql documentation page otherwise I
would not have known) that there would be an issue regarding
acquiring additional privileges from the mysql administrator.
However, it is my raq and I do have (should have) all the privileges.

I must be doing something wrong, but don't know what. Anyone had the
same poblem? Anyone knowing the solution? Thanks.

Using mysql version  "Cobalt MySQL Release 3.23.37-1 "

The quote from Joerg:
One case not mentioned here and you get an 1045 "Access denied" error
is when you don't have the privilege to alter system tables using
"LOCK TABLES". The connect succeeds, but a "LOCK TABLES" query fails.
Then you should ask the MySQL administrator to extend your
privileges. The "LOCK TABLES" command is writing to the system
tables. If the MySQL administrator decided to grant you all
privileges only on your database, say foo.*, this won't be
sufficient. You will need write access to 'mysql' database. If you
don't have that, you will get a MySQL error "#1045 access denied" at
the "LOCK TABLES" query. So, the case of "LOCK TABLE" privilege in
MySQL breaks a privilege system where administrators decided to grant
privileges ordered by database hierarchy.

__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.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




-
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: assigning a user/passwd to a database

2002-11-14 Thread Peter Lovatt
Hi

have you looked at GRANT

http://www.mysql.com/doc/en/GRANT.html

I think it is what you are looking for

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Chris Walcott [mailto:cwalcott@;macromedia.com]
Sent: 14 November 2002 19:25
To: Mysql-L (E-mail)
Subject: assigning a user/passwd to a database


How do I set a username/passwd to a specific database for authentication?

I know how to create users but I can't find anything in the docs about how
to password protect a database that is publicly available.

I'm using mysql with ColdFusion and one of the things you are aupposed to
supply when binding a database to CF is a username and password

- chris

-
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




RE: Table solution

2002-11-11 Thread Peter Lovatt
phpMyAdmin has an 'export to csv or Excel' function. If you are running php
this will produce a CSV file you can import directly into Excel

http://www.phpwizard.net/projects/phpMyAdmin/

hth

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Lamar [mailto:lamarts@;flash.net]
Sent: 12 November 2002 02:15
To: [EMAIL PROTECTED]
Subject: Table solution


Hello All,

I want to copy a table from a webserver that has MySQL database server
located on it, then, ftp to my local machine to insert into my local
database.

any ideas on how to do this?

my goal is to create an Excel spreadsheet from the table for distribution. I
have created the spreadsheet using the database on my local machine, but I
want the database on the webserver.

I appreciate any direction or guidance.

sincerely,

Lamar


-
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




RE: SCHEMA, ARCHITECTURE ???

2002-11-11 Thread Peter Lovatt
-Original Message-
From: William Martell [mailto:willmartell@;yahoo.com]
Sent: 11 November 2002 20:02
To: MySQL Main List
Subject: SCHEMA, ARCHITECTURE ???


>Hello All,

>How do I determine the best architecture for my MySQL database?

Years of painful but fulfilling experience :)

Seriously . you need a generic tutorial on 'database design' - try
google


>Do I create multiple databases or do I create only one database with
>multiple tables? (Any general rules of thumb?)

one database per project, multiple tables, unless you have a specific reason
not to



>How do I know if I need to use Keys, Indexes or other features in order to
>optimize the database?

Always best to index on fields used in queries, and always key tables unless
you have a reason not to - google search for tutorial/info on 'database
design and normalisation'

If you have any more questions or any more specific questions once you get
started just ask


HTH

Peter



-
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




FW: php J2EE .NET

2002-11-06 Thread Peter Lovatt
Hi

There is an article on sitepoint.com about benchmarking J2EE and  .NET and
some controversy over the result
http://www.sitepoint.com/newsletters/viewissue.php?fid=3&id=3&issue=52

Does anybody have experience of php/MySql in comparison with either of the
above in terms of efficiency or ultimate performance?

Is anybody interested in putting a php/MySql setup through the same
benchmarks?

Mostly for fun, but might be useful for the 'but Open Source is not up to
Enterprise Applications' augment.

Peter

Mysql query blah..
---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---





-
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: select using regexp

2002-11-04 Thread Peter Lovatt
Hi

You could use either normal or fulltext searches. Regexp may well be a good
answer (not used it myself). The following should also work

SELECT *
FROM table
WHERE
field LIKE "% cat %"
OR field LIKE "% cat. %"
OR field LIKE "% cat, %"

(note the spaces to make sure you get only complete words)

or if you have a mysql version that supports FULLTEXT

SELECT * FROM table
WHERE MATCH (field) AGAINST ('cat');

http://www.mysql.com/doc/en/Fulltext_Search.html

which is much more elegant

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---

-Original Message-
From: Mark Goodge [mailto:mark@;good-stuff.co.uk]
Sent: 04 November 2002 11:21
To: [EMAIL PROTECTED]
Subject: select using regexp


Hi,

I've got a problem that I'm hoping someone can help with. I need to do
a query against a text column in order to extract entries that will
match whole words only - for example, a search for "cat" should match
any of:

  The cat sat on the mat
  It was a large cat.
  Cat food is interesting.
  Dog. Cat. Fish.

but not match

  in a catatonic state
  it was a catastrophe
 scattergun approach

It looks as if the MySQL REGEXP function is what I need here, but I
can't work out from the documentation how to get what I want.

Any suggestions?

Mark

-
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




RE: klez worm (OT)

2002-10-30 Thread Peter Lovatt
Hi

I am getting two or three klez infected emails a day to the address I use
for
these lists

Somebody out there is probably infected. Do us all a favour and make sure
you are virus free :)

Thanks

Peter

sql,query,php blah..

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---








-
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: Re[4]: [PHP-DB] database synchronization

2002-10-29 Thread Peter Lovatt
Hi

If the records are all independant - ie travel agent (TA) A has their own
records and so does TA B then REPLACE INTO MainDB SELECT * FROM
Travel_agent_A_DB so the main database is just receiveing updated records
from the TAs.

Travel agent logs in to master php driven site .
master php driven site logs TA IP
master php driven site makes connection to TA mysql using IP
master php driven site gets new/updated records
master php driven site writes new/updated records to master DB

If more than one travel agent can update the same record then you risk
corrupting the data. If they do not have a live connection to the master
then the record they update may itself be out of date. The only way I can
see of doing this is soem system that locks a record for the period that TA
might take updating it.

Perhaps

TA A login
TA grab record, mark as locked
TA B gets 'locked record' message
TA A updates record and writes back to master
record marked as not locked

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: Martin Hudec [mailto:corwin@;corwin.sk]
Sent: 29 October 2002 09:18
To: Peter Lovatt
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re[4]: [PHP-DB] database synchronization


Hello Peter,

okay :)))so far I understand...buthmmm let me explain

I have server of travel agencies records (we need to update this, so
it is slave) with stable IPand then bunch of other computers (from
these we are updating...so they are all masters) in various travel
agencies...but not all of them have stable IP (some joins using
dialup...some have stable line)...some girl there updates
database...and they may not be on net:).
So in this case i have one slave and many masters.

solution one:

My server (slave) has to periodically check for updateswhen
masters have stable IP I can make list of IPs and then connect to each
server and take binary update log...and use itbut what can i do
when master has dynamic IP? So i discard this solution

solution two...better...from my point of view ;):

Masters with stable IP will update in period of for example 4
hoursmasters with dynamic IP will update when they are online
(girl browsing on chatting sites ;)))that puts the question if
there is possible to make remote update (sending binlog from master to
slave and automatically updating slave)(but if i understood your
previous mail...synchronization (replication) is done automaticaly
the question two is what if this master is running Windows 98 with
MySQL-win for example? Is that possible to make also in windows?

I will try to post this also to mysql list

--
Best regards,
 Martinmailto:corwin@;corwin.sk

Tuesday, October 29, 2002, 10:05:00 AM, you wrote:

PL> Hi

PL> Replication works continuously when the two databases are in contact
with
PL> each other, unless you specify otherwise. Likewise, if you connect
PL> periodically, MySql will synchronise the two databases itself.

PL> With replication, MySql logs everything the master does. When a slave
logs
PL> in (you can have any number of slaves) it checks the master logs to see
how
PL> up to date it is, and 'catches up' with the master.

PL> Once it is set up correctly you don't need to do anything yourself.

PL> HTH

PL> Peter

PL> ---
PL> Excellence in internet and open source software
PL> ---
PL> Sunmaia
PL> www.sunmaia.net
PL> tel. 0121-242-1473
PL> ---


-
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




RE: mysql access via php function, hlp with syntax

2002-10-27 Thread Peter Lovatt
Hi

If this is the full code you are missing the final } to close the function

I find it helps to comment the closing brackets

HTH

Peter


function dtb_qry_tbl_dsp($qry, $qry1, $qry2)
 {

  $result = mysql_query($qry);
  $result1 = mysql_query($qry1);
  $result2 = mysql_query($qry2);

  $i = 0;
  $k = 0;

  while(($row = mysql_fetch_row($result, $result1, $result2)))
   {
 echo "";
  for($i; $i < count($row); $i++)
   {
echo "";
 for($k; $k <= count($row["$i"]); $k++)
  {
echo
"".htmlspecialchars(stripslashes($row["$i,$k"]))."";
  }//end inner for loop
 echo "";
   }//end outer for loop
  echo "";
   }//end while

}//missing end function bracket

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: Randy Hammons [mailto:rathlon1@;cox.net]
Sent: 26 October 2002 18:45
To: mysql
Subject: mysql access via php function, hlp with syntax


Can someone please tell me what is wrong with this function?  I can't for
the life of me see an error.  But, for some reason I keep getting the
following error:

PARSE ERROR: parse error, unexpected $ in
"d:\web.root\xx_db\inc\functions1.inc on line 28

function is:

function dtb_qry_tbl_dsp($qry, $qry1, $qry2)
 {

  $result = mysql_query($qry);
  $result1 = mysql_query($qry1);
  $result2 = mysql_query($qry2);

  $i = 0;
  $k = 0;

  while(($row = mysql_fetch_row($result, $result1, $result2)))
   {
 echo "";
  for($i; $i < count($row); $i++)
   {
echo "";
 for($k; $k <= count($row["$i"]); $k++)
  {
echo "".htmlspecialchars(
stripslashes($row["$i,$k"]))."";
  }
 echo "";
   }
  echo "";
   }




-
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




RE: Tips for LARGE system

2002-10-20 Thread Peter Lovatt
Hi

Bigger than my experience, so just a suggestion - have you looked at
replication?

If you have a master which does all the processing and (multiple) slaves
which handle all the reads then you might benefit from cheaper Intel
hardware and have a more robust system to boot.

Good luck!

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: spiros [mailto:moka@;hol.gr]
Sent: 21 October 2002 00:00
To: [EMAIL PROTECTED]
Subject: Tips for LARGE system


I need to come up with an intra-company system recommendation: We are
looking
at a possibly huge system getting data from a LAN(No web-based app or
anything-in fact it will NOT be connected to the web)
 handling from 3M to 20M records/day with  potentially a lot of processing,
live inserts/ updates etc.
 I have a demo version(running on a PIII 2x1000MHz, 2GB RAM
 Linux machine) but it cannot handle the full load.
I am thinking of keeping Mysql 4-0.4. and going
 to an alpha machine(running linux). The question is whether anyone has done
this before. So I am looking for tips and recommendations(before buying any
hardware):

 1) Are there any known or expected problems with Mysql on alpha machines?

2) Do I need a special linux version(the kernel I use says 2.4.18-4GB, but I
need much more RAM and
 in fact this is the main reason for going to an alpha machine)?(never used
linux on anything except Pentiums)

3) Are there any guidelines in estimating more presicely what  hardware I
will
need?
4)  I cannot foresee all the possible growth, nor will the initial budget be
huge. Is it then woth planning for building out / clustering for some
redunacy and some load balancing upfront

5) Suppose I get this system running. What are the problems in keeping it
running? Critics say that
a)"data management is a pain"
b) "scalability is pretty non-existant (just sticking more RAM)". I though
it
would be much cheaper to stick in more RAM than going to another RDBMS
c) "it lacks a load of fundamental features of large RDBMS". I thought 4.1
should be  out between end of Octobera nd January, and it will have
triggers,
no?

6) How is a hot backup organized in Mysql(i.e.  backing up the data while
 the database is running)

7) I'd also appreciate any input from people who have used official mysql
support before. Hopefully there will be a set of issues:

a) hardware requirements
b) setting up and configuring(i.e. specifying InnoDB buffer sizes)
c) performance tuneup.

Again, I'd appreciate any info from mysql people or people who used mysql
support before. My problem is that  from mysql support I am told we can
discuss all these after signing a support contract, but to get there I need
to come up with a company realistic cost estimate  that includes the
necessary hardware...

I'd appreciate any input from people running such systems.
 I have never used any other RDBMS, so I am cannot judge if the critisism is
justified or not and would appreciate any help on this

Thanks, S.Alexiou

-
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




RE: Inserting Master and Details records

2002-10-16 Thread Peter Lovatt

Hi

insert_id returns the key value. I use php, and the mysql_insert_id is the
last insert_id on that connection, so even if other processes have added new
records in the time the script runs the insert_id is the correct one.

You can then use that as the key in the detail records.

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: Alan McDonald [mailto:[EMAIL PROTECTED]]
Sent: 16 October 2002 13:45
To: [EMAIL PROTECTED]
Subject: Inserting Master and Details records


My task is to insert a new master record and several detail records within
the one transaction.

There is a foreign key on the detail table set to the unique key (autoinc)
field of the master table.

Inserting a master record, even with a special field value so that it can be
quickly returned with the newly created primary key, so that I might then
insert the detail records with this primary key as their foreign key, does
not seem very reliable to me (as suggested a few days ago).

There must be a more reliable way to do this under heavy traffic. I'm afraid
I'm used to being able to grab a generator ID and using that (guaranteed to
be unique) for both the primary key of the master and the foreign key of the
detail records. Surely there is a good method for use with MySQL?

Alan McDonald
http://www.meta.com.au



-
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




RE: Urgent Help! Importing Data from Text File...

2002-10-10 Thread Peter Lovatt

Hi

Two thoughts

try \r\n instead of \n

or

if you are getting warnings it may be that there is a problem with the
data - illegal characters or something?

if neither works email me offlist and I will take a look, if that helps.

HTH

Peter


---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: Nasir Aziz Gill [mailto:[EMAIL PROTECTED]]
Sent: 10 October 2002 09:27
To: [EMAIL PROTECTED]
Subject: Urgent Help! Importing Data from Text File...
Importance: High


Hi fellows,

I got one text file of 9816 records (9816 lines) seprated by commas and
enclosed by the inverted quotes and seprated by the end of lines. But when I
import the file, it only gets half of records in the table using below
mentioned command;

LOAD DATA INFILE 'user.txt' INTO TABLE userdata
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n'
(category, fname, lname, adresse, zip, city, 
telephone, email,
homepage);


I get the below mentoned message;

>>Query OK, 4908 rows affected (0.91 sec)
>>Records: 4908  Deleted: 0  Skipped: 0  Warnings: 4913


Few records are as follow from the text file;

"1","Peter","John","512 Rennes
Road","19810","Wilmington","","mailto:[EMAIL PROTECTED]","http://www.mobili
nk.com"
"1","Sandra","Bridget","12th Aveneue No. 301","12548","Broklyn","(212)780
101 10","mailto:[EMAIL PROTECTED]","";

Note:"" fields are empty(missing data) i.e.(in some records, one is
missing faxnumber and in some records one is missing homepage and in some
one is missing telephone as well. That's why I have to use the empty quotes
for representing that field.

The table structure is as follow;

CREATE TABLE userdata (
  accno int(10) unsigned NOT NULL auto_increment,
  category mediumint(6) unsigned zerofill NOT NULL default '0',
  fname varchar(128) NOT NULL default '',
  lname varchar(128) NOT NULL default '',
  add(128) NOT NULL default '',
  zip varchar(6) NOT NULL default '',
  city varchar(64) NOT NULL default '',
  telefone varchar(16) NOT NULL default '',
  homepage varchar(128) NOT NULL default '',
  email varchar(128) NOT NULL default '',
  telefax varchar(16) NOT NULL default '',
  PRIMARY KEY  (accno),
  KEY category (category),
  KEY fname (fname),
  KEY telefone (telefone),
  KEY zip (zip),
  KEY city (city),
  KEY telefax (telefax)
) TYPE=MyISAM;

Please advise me that whey I am not getting the whole records in the table
from the text file.

Your help will be highly appreciated...
With Best Regards...

Nasir



-
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




RE: Updating the same Databases with new fields automatically

2002-10-10 Thread Peter Lovatt

hi

ALTER TABLE `database1`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database2`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database3`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database4`.`tablename` ADD `newfield` TINYINT NOT NULL;


etc

or script it using a loop changing the database name each time


---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: JuppJacke [mailto:[EMAIL PROTECTED]]
Sent: 10 October 2002 09:22
To: Mysql Mailinglist
Subject: Updating the same Databases with new fields automatically


Hi,

i am looking for a easy way to update MySQL-databases and -tables which have
the same structure.

For example "Database1" has the same structure and tables as "Database 2".

Now i add new datafields in "Database1" and i i also want them to be in
"Database 2".

And when you dont have only two databases which are same then it is a lot of
work to do it in all databases and to add the new fields there.

Is there any way for an automatic process of updating several databases with
the same new fields.

I am looking for a way to program this or for tool or both.

Thanks a lot to a mysql beginner.

Gerd


-
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




RE: using php to connect to a 2nd mySQL server

2002-10-09 Thread Peter Lovatt

the port is part of the server parameter in the connection eg port 3307

mysql_connect ( localhost:3307 , username , password )

http://www.php.net/manual/en/function.mysql-connect.php

has the details

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: Webmaster [mailto:[EMAIL PROTECTED]]
Sent: 09 October 2002 15:57
To: [EMAIL PROTECTED]
Subject: using php to connect to a 2nd mySQL server


Hello all,

I am new to this list ... and hope to find an answer to a question
which has come up.

On the server for my websites at my ISP, a mySQL server is installed
to handle different customers' databases (1 database setup for each
customer)

Now, as I have a need for a mySQL server where I can create/delete
databases, my ISP agreed to install a 2nd mySQL server that can be
dedicated to my sole use ... but I am told it would run on a
different port number ...

My question now is this: How can I tell a php script to not use the
standard mySQL server that exists on this server computer, but to use
the 2nd mySQL server that runs on the different port number ?
Currently I use info set up in variables like this:

# MySQL database config stuff
$host="localhost";
$username="abcdefg";
$database="database";
$password="123456789";

Is it possible to add the port information somwhere? or does a php
connection always use the standard mySQL port settings?

Any help is greatly appreciated. Thanks!

God bless you with His grace and peace
Wolfgang Schneider

-- BibelCenter: http://www.bibelcenter.de/ - "Come and See!"
-- Bookstore: http://www.worthy.net/BibelCenter/ - "Great offers! Check it
out!"
-- email: mailto:[EMAIL PROTECTED]
-- http://awesome.crossdaily.com/vote.php3?sid=952 -- Your Vote!




-
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




RE: Performance Question.

2002-10-06 Thread Peter Lovatt

Hi

Just did a quick test using phpMyAdmin

INSERT INTO `db`.`speedtest` SELECT * FROM `db`.`table1`

These are just standard MyISAM tables

The query creates about 120,000 rows and 5 indexes on CHAR fields in 45
seconds so you should be fine if MySql does the work. If you have a lot of
Java manipulation as part of the process then you need to allow for that, if
not your system should walk it.

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: Ed Carp [mailto:[EMAIL PROTECTED]]
Sent: 06 October 2002 21:08
To: Peter Lovatt; Robert H.R. Restad; [EMAIL PROTECTED]
Subject: RE: Performance Question.


> I am running php/mysql on 2x PIII 1 GHz / 512MB RAM / SCSI and can run
> queries on datasets of 220,000
>
> SELECT * FROM `Tablename` WHERE `Prod_code` LIKE 'A43611109%' in less time
> than I can count (0.1 sec at a guess)
>
> The insert/update bit is the bit which will dictate the speed - how many
> records need updating?

Don't forget the considerable overhead of PHP itself.

sql, query




-
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: Performance Question.

2002-10-06 Thread Peter Lovatt

Hi

I am running php/mysql on 2x PIII 1 GHz / 512MB RAM / SCSI and can run
queries on datasets of 220,000

SELECT * FROM `Tablename` WHERE `Prod_code` LIKE 'A43611109%' in less time
than I can count (0.1 sec at a guess)

The insert/update bit is the bit which will dictate the speed - how many
records need updating?

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: Robert H.R. Restad [mailto:[EMAIL PROTECTED]]
Sent: 06 October 2002 14:36
To: [EMAIL PROTECTED]
Subject: Performance Question.


I am writing a serverside application in Java which needs to query/search
200 000 rows and update affected records once every 2 minutes.

As performance/speed is of importance here -  and this Table only contains
5-10 Columns of Integer numbers, I figured that using a HEAP type of table
would be the fastest.. (right?)

The imaginary system this will run on, is a Dual CPU P4/1,5Ghz or similar
with 2Gb RAM.

Now, what I am curious to find out is... Does this amount of
searches/queries sound like 'unreasonable' for MySQL and/or HEAP tables for
the current system configuration?

As I've read about MySQL performance, it appears to me that the real drag is
usually disk-search. Now, the size of the database in my case is not an
issue, it will be constantly 200 000 rows, the only thing that will change
is the integer numbers stored. As far as I am concerned, that should mean I
would never need to access the disk at all (apart from when dumping this
table from memory to disk for the purpose of backups, of course)...

Anyone got a good tip for how to solve this issue to make sure I dont end up
with a database bottleneck in the system...

Cheers
Rob.

__
Se den nye Yahoo! Mail på http://no.yahoo.com/
Nytt design, enklere å bruke, alltid tilgang til Adressebok, Kalender og
Notisbok

-
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




RE: Need to match similar words

2002-10-05 Thread Peter Lovatt


SOUNDEX might meet your needs

http://www.mysql.com/doc/en/String_functions.html


Peter


---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: FABIAN VON ROMBERG [mailto:[EMAIL PROTECTED]]
Sent: 05 October 2002 22:50
To: [EMAIL PROTECTED]
Subject: Need to match similar words


Hi, is there any chance in MySql to match similar strings and rate it? Ex:

string: apples


criterias:
apples100%
apple  90%
appl   80%
applee 50%
appple 15%

Any help will be much appreciated.

Thanks in advance,
Fabian


_
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.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




-
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: A rookie question

2002-09-30 Thread Peter Lovatt



---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: Paul Romanic [mailto:[EMAIL PROTECTED]]
Sent: 30 September 2002 03:53
To: [EMAIL PROTECTED]
Subject: A rookie question


Hello, and apologies for such a novice question...

>we were all there once :)


I have a need to find a method to allow a user to update information on
members of our organization. The typical number of students' info that needs
updated is 50-75. The info to be updated is grade change, and year of Latin
change for each student.

My initial thought (if I transfer the database to MySQL from FileMaker) is
to set up the database as a relational database with students in one table,
the schools in a second and the school name being the link.

The real question is...if I use PHP to access MySQL, can I allow the user to
edit the records (or portion of them) from one Web page with ONE submit
button? Is this even possible? I want know I could do this with a submit
button for each member, but that would not be too end user friendly!

>yes
> my usual approach is to have the form fields labelled so they return an
array. You then work through the array in the script that you post to,
updating one record at a time.

>You may find examples out there, http://www.phpbuilder.com is good source.

>If you need any more information email me offlist and I will send some
sample code.

HTH

Peter





Thanks for putting up with a novice question, and any help you can offer!
Paul

J. Paul Romanic, R.A.
State Chair
Ohio Junior Classical League




-
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




  1   2   >