RE: Two values for LIMIT?

2003-03-24 Thread Jon Haworth
Hi Antonio, > I need help for prompt LIMIT with two values, the > first value is the starting row, the second value > end of LIMIT. I think your syntax is a little bit out... if you're passing two values, the following apply: - The first value is the starting row - The second value is the numb

RE: Boolean!

2002-04-15 Thread Jon Haworth
Hi T., > How can I set the domain of a attribute to a boolean value? OK, I'm not entirely clear with your terminology, but I think you're asking "how do I define a field as a boolean"... MySQL doesn't provide a boolean datatype as such, but in my experience the best way to handle it is to defin

RE: Char vs Varchar field types

2002-04-10 Thread Jon Haworth
Hi Luke, > When is it appropriate to use Char instead of Varchar and vice versa? Use CHAR for when you know in advance how many characters are going to be in that field. A good example is for MD5 hashes: they are always 32 characters long, so you can use CHAR(32). Use VARCHAR for when you don't

RE: [PHP] Dumped OK, Restore NOT

2001-12-05 Thread Jon Haworth
> Anyways, if any PHP people here are--god forbid--actually using MySQL as > their database, I would GREATLY appreciate any help in this matter. I've > thoroughly read the mysqldump chapter in the docs, and gone through > several tutorials, but have found nothing on actually restoring a > data

RE: [PHP] Access to MYSQL via ODBC?

2001-11-13 Thread Jon Haworth
> apart from performance issues, is it possible in PHP to read/write a > MYSQL DB not directly, but via ODBC? The reason (as states in my other > message "MS ACCESS on Linux") is that it would make possible to test on > Linux PHP code that would eventually manage (wit xero or minimal changes) > an

Inserting values into table

2001-06-28 Thread Jon Haworth
Hi list, Sorry if this appears twice, our mail server is playing up at the moment. We've got an sql file that was created using mysqldump on an NT box. The info in this file needs to be imported into MySQL on a Linux box. When I run /usr/local/mysql/bin/mysql < /home/jon/dump.sql I get "Err

RE: order by rand() question

2001-06-15 Thread Jon Haworth
I don't think the answer has changed since last week :-) IMHO it's not "really slow and inefficient", anyway - this script: ---start--- end produces a table with 1 rows each containing an integer. Then we do: mysql> SELECT * FROM mytable ORDER BY RAND() LIMIT 5; +-+ | myfi

RE: Can only create 127 records in a table :o(

2001-06-15 Thread Jon Haworth
Your autoincrement column is of type TINYINT. This type is specifically designed to only hold numbers from 0 to 127. For best results, use an INTEGER - they can accept numbers up to 999 IIRC. HTH Jon -Original Message- From: Mette Møller Madsen [mailto:[EMAIL PROTECTED]] Sent: 1

RE: concated comparisons stopped working properly

2001-06-14 Thread Jon Haworth
> And why do you think it should return 0 ? > > ( 1 < 5 ) returns 1. > ( 1 < 3 ) returns 1. > ( 1 < 5 < 3 ) should then return 1. > > Or am I missing something? > I think probably becuse ( 5 < 3 ) returns 0. Depends how you read it, either as "1 is less than 5 and less than 3" or "1 is less t

RE: re: startup Help

2001-06-13 Thread Jon Haworth
I take it you're running Windows? If so then PATH is an environment variable that allows you to run any command in its directories from anywhere. Example: c:\> path=c:\windows;c:\windows\command c:\> dir *.exe Volume in drive C has no label Volume Serial Number is 07D1-0502 Directory of C

RE: MySQL/PHP/Apache on PPC

2001-05-31 Thread Jon Haworth
Hi, What I am wanting to know is, am I best off installing MySQL/PHP/Apache on Windows98 (emulated on G4 Mac/OS 9.1) or should I hold off for an installation on a separate partition of LinuxPPC. I have tried installing on the Win98 emulator but there are loads of errors. I don't know much

RE: how to setup a Newsletter?

2001-05-30 Thread Jon Haworth
You could do this with PHP. insert story into database; do { get subscriber email address; send email with link to story; } until no more subscribers If you have a lot of subscribers you'd be better off with a proper list manager, though. HTH Jon -Original Message- From: kaab kaou

RE: Can't login to MySQL from PHP

2001-05-29 Thread Jon Haworth
Hi Marco, The usual method is something along the lines of: --start-- $server = "localhost"; $username = "your username"; $password = "your password"; $database = "your database name"; $db_handler = mysql_connect($server, $username, $password) or die (mysql_error()); mysql_select_db ($database);

RE: another question to continue

2001-05-25 Thread Jon Haworth
Yes, you have to escape special characters. Not sure about accents etc, but a search on the list archives (lists.mysql.com) should turn up something, this gets discussed pretty regularly. HTH Jon -Original Message- From: Jari Mäkelä [mailto:[EMAIL PROTECTED]] Sent: 25 May 2001 13:03 To

RE: Database accepts only 127 records

2001-05-25 Thread Jon Haworth
Define your tables so you're not using TINYINT as your primary key - it has a maximum size of 127. If you use INTEGER you should be fine. HTH Jon -Original Message- From: Jari Mäkelä [mailto:[EMAIL PROTECTED]] Sent: 25 May 2001 12:29 To: [EMAIL PROTECTED] Subject: Database accepts only

RE: Basic Beginner Question

2001-05-24 Thread Jon Haworth
Try clicking on "Execute SQL Statement" and entering "CREATE DATABASE MyDatabaseName" (without the quotes, and replacing MyDatabaseName with whatever you like). It should be as simple as that, but if it doesn't work, you may want to check with your host that you _are_ allowed to do it - some don'

RE: characters - URGENT!!

2001-05-24 Thread Jon Haworth
I would say it depends on what you're using to put the data into your database. PHP comes with several functions that make this sort of thing very easy (strip_tags, for example, will remove all HTML tags from a string) If you're using Perl or something else that supports regex, I think that's go

RE: Cold Fusion Express

2001-05-23 Thread Jon Haworth
Perhaps MyODBC would help you out... http://www.mysql.com/downloads/api-myodbc.html Don't know for sure but it's probably worth a look :-) HTH Jon -Original Message- From: Timothy Heald [mailto:[EMAIL PROTECTED]] Sent: 23 May 2001 13:57 To: [EMAIL PROTECTED] Subject: Cold Fusion Expres

RE: To install MySQL, where can free download Lunix?

2001-05-01 Thread Jon Haworth
http://www.slackware.com/ (IMHO the best distro) Other distros: http://www.suse.com/ http://www.debian.com/ http://www.mandrake.com/ http://www.redhat.com/ etc A google for "download linux" would have answered the question for you, BTW. HTH Jon -Original Message- From: johnd [mailto:[

RE: My script that uses mysql.

2001-03-23 Thread Jon Haworth
> I am not sure if i should post it here but please do help my if you can. Probably one of the PHP lists would be a better place ;-) Check out http://www.php.net/support.php for a full run-down. > The script is as follows: > I basically have two questions. > If i want to make a "mailto" funct

RE: MYSQL on Windows 2k

2001-03-22 Thread Jon Haworth
Are you in the right directory, or do you have your PATH environment variable set to point to the right directory? Running mysql from C:\windows\ is unlikely to work unless you've tweaked your settings. HTH Jon -Original Message- From: Daniel J. [mailto:[EMAIL PROTECTED]] Sent: 22 March

RE: Connect Apache

2001-03-09 Thread Jon Haworth
Not sure exactly what you're after... MySQL isn't an Apache module, it's a separate program. You want MySQL to run on Apache? http://www.mysql.com/downloads/ You want Apache to run MySQL on? http://httpd.apache.org/ HTH Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROT

RE: Just Checking

2001-03-05 Thread Jon Haworth
ping! -Original Message- From: Quentin Bennett [mailto:[EMAIL PROTECTED]] Sent: 05 March 2001 03:04 To: MySQL (E-mail) Subject: Just Checking Hi, I someone sees this, can they respond, because I have received nothing from the list for 30 hours +. It's now 16:00 NZ Time, 03:00 GMT on M

RE: trying to install on RedHat 7.0 and need help

2001-03-05 Thread Jon Haworth
At the moment all anyone can do is point you to the manual at http://www.mysql.com/doc/I/n/Installing.html. Given how easy this is to find from www.mysql.com, we must assume you have already read it and therefore are having some sort of problem not covered by it - perhaps you could explain what i

RE: yes/no

2001-03-02 Thread Jon Haworth
I usually use a tinyint with a value of 1 for true, and 0 for false. There doesn't appear to be a boolean datatype in MySQL, but I may have missed it :-) HTH Jon -Original Message- From: Scott Dunn [mailto:[EMAIL PROTECTED]] Sent: 02 March 2001 13:55 To: Mysql Subject: yes/no I want

RE: Suggestion For List Management

2001-02-22 Thread Jon Haworth
Well, you could filter anything sent or cc'ed to [EMAIL PROTECTED] into a separate folder -Original Message- From: Jeff Gannaway [mailto:[EMAIL PROTECTED]] Sent: 22 February 2001 11:08 To: [EMAIL PROTECTED] Subject: Suggestion For List Management Here's an idea for the list memebers

RE: SQL statement in PHP

2001-02-16 Thread Jon Haworth
PHP sees the first " of "Consultancy" as being the end of the variable $sql. To get round this, change the " to ' inside the statement (e.g. ...where Business_Type = 'Consultancy' and...) HTH Jon -Original Message- From: Matt Davis [mailto:[EMAIL PROTECTED]] Sent: 16 February 2001 12:

RE: Here you have, ;o)

2001-02-13 Thread Jon Haworth
Oh no, not another one -Original Message- From: Mike Hammonds [mailto:[EMAIL PROTECTED]] Sent: 12 February 2001 18:30 To: [EMAIL PROTECTED] Subject: Here you have, ;o) Hi: Check This! - Before posting, please ch

RE: nested sets vs. key path method

2001-02-13 Thread Jon Haworth
Bob, you may sound like a broken record, but at least it's stuck on a particularly delightful song that I think everyone should listen to. If everyone on this list had this book we'd see a 50% reduction in traffic overnight :-) Cheers Jon -Original Message- From: Bob Hall [mailto:[EMAI

RE: Downloading MySql

2001-02-08 Thread Jon Haworth
http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.32-win.zip This is the link to the Win32 binary of the latest version. To find the downloads page on the website, visit www.mysql.com and click on the "Downloads" link in the menu on the left of the screen. HTH Jon -Original Message---

RE: Problem with MySQL's installation

2001-02-06 Thread Jon Haworth
Could it be that your username is ROOT and not ROO? Or was that a typo? -Original Message- From: Tom [mailto:[EMAIL PROTECTED]] Sent: 06 February 2001 15:06 To: [EMAIL PROTECTED] Subject: Problem with MySQL's installation Hello, I'm trying to install MySQL without success. I have inst

RE: Download of MySQL

2001-01-24 Thread Jon Haworth
Well, it's not me, I found it with no problems. 1. Click on "Downloads" 2. Click on the first link under "MySQL database" (helpfully labelled "Stable release, recommended") 3. Select your OS. Seems sensible enough. Cheers Jon -Original Message- From: Gustav Wiberg [mailto:[EMAIL PRO

RE: Memory

2001-01-23 Thread Jon Haworth
How about a RAM disk? I don't know of any for Linux but they must exist. Load the whole shebang into the RAM disk and then run it as normal from there instead of your HDD. You may want a cron job that periodically dumps the whole lot onto the HDD for backup purposes. HTH Jon -Original Messa

RE: Sorting a date

2001-01-23 Thread Jon Haworth
Forgot to mention... you can check it for validity easily using this method as well: if (checkdate($frmStartMonth,$frmStartDay,$frmStartYear)) { echo "You can enter dates correctly. Well done!"; } else { echo "Please visit http://i-am-a-llama.com/ex

RE: Sorting a date

2001-01-23 Thread Jon Haworth
You may find it easier to store the date as a timestamp and convert it on the fly, depending on what you're using to get the info from the database. In PHP, you'd need something like $date = mktime(0,0,0,$month,$day,$year); where $month, $day and $year hold the date you're dealing with

RE: Todd Poole

2001-01-16 Thread Jon Haworth
Read the unsubscribe instructions at the bottom of your e-mails. Works like a charm. -Original Message- From: Dave Bowen [mailto:[EMAIL PROTECTED]] Sent: 16 January 2001 13:14 To: [EMAIL PROTECTED] Subject: Todd Poole Please remove him from this list. I am the Exchange Admin at MindLea