Limit characters in a long text

2006-03-22 Thread CodeHeads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, Have a question: I would like to limit the amount of data viewed. I searched but did not find anything. Here is my code: $get_c = select * from $table ORDER BY news_id DESC LIMIT 5; $get_c_res = mysql_query($get_c) or die(mysql_error());

Re: Limit characters in a long text

2006-03-22 Thread CodeHeads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Adams wrote: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html I recommend LEFT( ). If you are looking to do it in PHP then this is the wrong email list. Good luck. Sorry about that I realized I picked the wrong mailing list

Re: data backup

2006-03-07 Thread CodeHeads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 07 Mar 2006 19:54:02 -0500 Mathieu Bruneau [EMAIL PROTECTED] wrote: kalin mintchev a écrit : hi all... what's the best way to periodically back up mysql data? so that databases and tables can be still usable even after a mysql

Re: file permission

2006-02-28 Thread CodeHeads
On Tuesday 28 February 2006 22:55, unplug wrote: Hi, When I use a query SELECT * into outfile '/tmp/report.csv' fields terminated by ',' lines terminated by '\n' FROM table;, it will create a file with the following permission and owner. -rw-rw-rw- 1 mysql mysql 2489 Mar 1 11:30

Re: file permission

2006-02-28 Thread CodeHeads
On Tuesday 28 February 2006 23:41, Joshua Kugler wrote: You can't do that. The mysql server runs as user mysql, so it cannot create files owned by another user. If you run the mysql server as root (don't!), you might be able to do that, but I do not believe mysql has a facility for changing

RE: Number Searches

2006-02-24 Thread CodeHeads
On Fri, 2006-02-24 at 10:02 -0600, John Trammell wrote: On Wed, 2006-02-22 at 16:49 -0600, Ariel Sánchez Mora wrote: So far i've been able to store ip addresses as strings like you would type them in DOS, for ex, '192.168.0.1'. This serves me great since my application uses IP

Re: email to db

2006-02-24 Thread CodeHeads
On Sat, 2006-02-25 at 10:49 +0800, Mark wrote: Can anyone tell me if it is possible to send an email from outlook to a DB so it updates a record. I have a php tipping script hosted with a mysql DB but would like users to email their tips instead of loggin on the site. Mark Wouldn't be

RE: Number Searches

2006-02-23 Thread CodeHeads
: CodeHeads [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 22 de febrero de 2006 17:35 Para: Ariel Sánchez Mora CC: mysql@lists.mysql.com Asunto: RE: Number Searches On Wed, 2006-02-22 at 16:49 -0600, Ariel Sánchez Mora wrote: So far i've been able to store ip addresses as strings like

Re: Number Searches

2006-02-23 Thread CodeHeads
On Thu, 2006-02-23 at 22:04 -0500, Mathieu Bruneau wrote: Ok I got 2 informations for you: 1) IPv4 address are actually 32 bit integer, easily store in 32 bits fast search etc etc etc (You can google for more on this storage format). Normally you could find a way to goes from the string

Re: Permissions

2006-02-23 Thread CodeHeads
On Thu, 2006-02-23 at 21:46 -0600, Walter Johnson wrote: #chown mysql:mysql /var/mysql-data #chmod 770 /var/mysql-data Try this, assuming the files are in there for the database. $chown -R mysql:mysql /var/mysql-data/* $chmod -R 770 /var/mysql-data/* Hope that helps. -- Best regards,

Number Searches

2006-02-22 Thread CodeHeads
Hello all, I have searched but cannot find what I am looking for. I have a full index index on a table and on of the fields is a number field (IP Address). Can MySQL search for numbers?? Thanks, Will -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: Number Searches

2006-02-22 Thread CodeHeads
On Wed, 2006-02-22 at 16:49 -0600, Ariel Sánchez Mora wrote: So far i've been able to store ip addresses as strings like you would type them in DOS, for ex, '192.168.0.1'. This serves me great since my application uses IP addresses as strings in all cases. I've done queries with the IP column