Re: Mysql Finding the country name from country prefix

2005-11-19 Thread Jasper Bryant-Greene
as it will return at least two results for many different phone numbers, with no way to tell which is the correct result. -- Jasper Bryant-Greene General Manager Album Limited +64 21 708 334 [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscrib

Re: case insensitive search

2005-11-18 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: but I'm getting case insensitive search?!? it's not the same I enter afan or Afan or AFAN!?? Your two statements contradict each other. Either you are getting case insensitive search, meaning that it *is* the same if you enter afan, Afan or AFAN, or you're getting cas

Re: solution for preventing injection attacks

2005-11-17 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: I have an idea for preventing sql injection attacks, however it would have to be implemented by the database vendor. Let me know if I am on the right track, this totally off base, or already implemented somewhere... Lets say you could have a format string such as in pr

Re: A "key" question

2005-11-17 Thread Jasper Bryant-Greene
Mikhail Berman wrote: Is it possible or makes sense to key a field that is a part of Unique Index already? It's possible, but it doesn't make sense. A unique index is a normal index with an added unique constraint. Adding another index on the same field would make no sense (unless the field

Re: Can't get REGEXP to work properly with utf8

2005-11-17 Thread Jasper Bryant-Greene
Oskar Joelson wrote: I found this in http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html : "REGEXP and RLIKE use the current character set (cp1252 Latin1 by default) when deciding the type of a character. Warning: These operators are not multi-byte safe." "These operators ar

Re: Mysql docs

2005-11-16 Thread Jasper Bryant-Greene
Scott Haneda wrote: Google this: subselect site:dev.mysql.com And I get mostly non English stuff, limiting to english and I get a whopping 37 pages, none of which seem to help me much. Try googling for "subquery", considering that's what they're called... Jasper -- MySQL General Mailing List

Re: frustration building

2005-11-15 Thread Jasper Bryant-Greene
Peter Matulis wrote: --- [EMAIL PROTECTED] wrote: Peter Matulis <[EMAIL PROTECTED]> wrote on 11/15/2005 02:47:56 PM: but in phpmyadmin I get these types of warning for five tables: table 1: UNIQUE and INDEX keys should not both be set for column `email` table 2: More than one INDEX key wa

Re: where is the mistake in this SQL statement?

2005-11-15 Thread Jasper Bryant-Greene
Harald Fuchs wrote: In article <[EMAIL PROTECTED]>, Joerg Bruehe <[EMAIL PROTECTED]> writes: CREATE TABLE users ( id PRIMARY KEY, priority integer NOT NULL DEFAULT '7', policy_id integer unsigned NOT NULL DEFAULT '1', Even though this may work, it is wrong IMNSHO: You set character strings

Re: Best Fieldtype to store IP address...

2005-11-11 Thread Jasper Bryant-Greene
Rhino wrote: Isn't there a new way to express IP addresses called IPV6(?) which has a possibility of 6 distinct parts instead of the traditional 4? I haven't seen one of these new formats myself yet but for all I know, they will become soon in the near future. Maybe you'd better choose a field ty

Re: Updating a LONGTEXT field

2005-11-11 Thread Jasper Bryant-Greene
Whil Hentzen wrote: Hi folks, I'm converting a database to MySQL, and rewriting the code to work with MySQL from the old datastore. One of the fields in one of the tables is a longtext type that contains a history of system accesses - each time the system is touched in one form or another,

Re: Best Fieldtype to store IP address...

2005-11-11 Thread Jasper Bryant-Greene
Peter M. Groen wrote: On Friday 11 November 2005 21:33, Cory @ SkyVantage wrote: I'm using MySQL-Cluster 5.0, and we're doing some research. What is everyone's opinion as to what the best fieldtype to store an IP address in? varchar(16) ? because 16 is the max chars of an ip address... char(

Re: 1266 creating innodb tables

2005-11-11 Thread Jasper Bryant-Greene
P. Evans wrote: skip-innodb is commented out,thats why its not in the options I sent previously. The logs are showing something peculiar - InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes InnoDB: than specified in the .cnf file 0 268435456 bytes! ls shows

Re: 1266 creating innodb tables

2005-11-10 Thread Jasper Bryant-Greene
P. Evans wrote: Shawn, as far as I can tell, no. Here's all my innodb options set in my.cnf : Well, it's easy to check: grep skip-innodb my.cnf Is there anything interesting in the logs, maybe on MySQL startup? Jasper -- MySQL General Mailing List For list archives: http://lists

Re: 1266 creating innodb tables

2005-11-09 Thread Jasper Bryant-Greene
P. Evans wrote: Whenever I try to create a table using innodb, i get a 1266 warning that the table has been created with myisam instead. I receive the error both at the mysql command line and using the mysql query browser. Can you please show us the CREATE TABLE command that you are using?

Re: Heikki: What will become of InnoDb once MySQL license runs out

2005-11-06 Thread Jasper Bryant-Greene
On Sun, 2005-11-06 at 16:45 -0600, mos wrote: > If this happens, what alternative will MySQL be offering their users who > need transactions and RI? The GPLed version of InnoDB? -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ b

Re: Possible to use a conditional in this UPDATE

2005-10-27 Thread Jasper Bryant-Greene
= "5511" > > However, I need a ELSE in there, I can not always assume other than '1' is > 'soon', is there some way to add in a ELSE? Depends how many alternate branches you want. You could just nest another IF where 'soon' is. -- Jasper Bryant-Green

Re: Mysql privs via PHP? Problems - * Now with error message

2005-10-27 Thread Jasper Bryant-Greene
lt MySQL install The following command: mysqld -V will tell you the version of your MySQL server. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ b: http://jbg.name/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579, Christchurc

Re: Mysql 4.0 cpu usage

2005-10-25 Thread Jasper Bryant-Greene
5%cpu and seems locked up. I cannot even > stop the service I have to end the process in the task manager. Any ideas? Logs? -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579,

Re: Map of MySQL Users

2005-10-24 Thread Jasper Bryant-Greene
re you finding the geographical location of email senders? -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579, Christchurch 8015, New Zealand -- MySQL General Mailing List For lis

Re: Not operator in Select statements

2005-10-23 Thread Jasper Bryant-Greene
e query is syntactically correct. If it didn't work for you, then your problem lies elsewhere. Perhaps post your error message? By the way, your question would have been answered by reading the manual... -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www

Re: Should I buy commercial license?

2005-10-23 Thread Jasper Bryant-Greene
On Mon, 2005-10-24 at 09:29 +0900, Kenji HIROHAMA wrote: > On 10/24/05, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: > > That's not necessarily true. Many people need to buy a license because > > they need the support that comes with paying for the software, or th

Re: Should I buy commercial license?

2005-10-23 Thread Jasper Bryant-Greene
any people need to buy a license because they need the support that comes with paying for the software, or they need to support the development of a product that they are likely to rely on for their business. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://ww

RE: max packet size question

2005-10-21 Thread Jasper Bryant-Greene
ect: max packet size question > > Is there a practical maximum for max packet size? Is it simply a function of > the amount of memory that you have? -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ p: 0800 4 ALBUM (0800 425 286)

Re: multiple commands to mysql from regular command line

2005-10-21 Thread Jasper Bryant-Greene
ny as you want. Alternatively, place the SQL that needs executing in file.sql, and do this: mysql -u${DB_USER} -p${DB_PASSWORD} < file.sql Or do this (maybe from a script): echo ${SQL_TO_EXECUTE} | mysql -u${DB_USER} -p${DB_PASSWORD} -- Jasper Bryant-Greene General Manager Alb

Re: left not working

2005-10-20 Thread Jasper Bryant-Greene
7;$filename' If you want it to work like that, you need to do: left(longa,40) AS longa > > The line that looks like this: > $long =mysql_result($result, 0, "longa"); > > Is throwing this error: > Warning: mysql_result(): longa not found in MySQL result index

Re: select query taking too long

2005-10-19 Thread Jasper Bryant-Greene
umns you are querying against; I'd start with accountstatus, eid, loginid, applicationname, profilecode... >From the names I'd suggest some of those might be UNIQUE indexes or PRIMARY KEYs. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.

Strange error in query with joins and subquery

2005-10-17 Thread Jasper Bryant-Greene
Just recently (possibly since upgrading to MySQL 5.0.13 RC), I've been getting the following error with queries like the one below. Unknown column 'photos.id' in 'on clause' (1054) SELECT photos.* FROM photos LEFT JOIN tags_photos ON tags_photos.photo = photos.id WHERE 1 AND tags_photos.tag IN

Re: Aborted connection problems

2005-10-11 Thread Jasper Bryant-Greene
bytes, certainly nowhere near 16MB. Jasper Bryant-Greene wrote: I seem to be getting heaps of aborted connections, and I can't figure out why. MySQL's error (from mysqld.err, below) is "Got an error reading communication packets", but this is a socket link to localhost

Aborted connection problems

2005-10-11 Thread Jasper Bryant-Greene
; user: 'album_read' host: 'localhost' (Got an error reading communication packets) -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: users are always the last to know :-)

2005-10-07 Thread Jasper Bryant-Greene
open source version. I don't personally think there's anything to worry about. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Selecting a group of distinct items?

2005-10-06 Thread Jasper Bryant-Greene
stop top-posting. Jasper On Fri, 2005-10-07 at 12:29 +1300, Jasper Bryant-Greene wrote: Manish Marathe wrote: SELECT DISTINCT(name), date, value FROM table_name ORDER BY date DESC; DISTINCT is not a function. The above (if it even works) is exactly equivalent to: SELECT DISTINCT name, dat

Re: Selecting a group of distinct items?

2005-10-06 Thread Jasper Bryant-Greene
, combinations of name, date and value). -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: A SQL statement to copy a blob from one table to another

2005-10-06 Thread Jasper Bryant-Greene
-- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Help with query using IN()

2005-10-04 Thread Jasper Bryant-Greene
PRIMARY 4 *NULL* 40 Using where It's using a primary key and only examining the 40 rows which you asked for, so that's about as optimised as you'll get for that query. You could always make the actual server faster... -- Jasper Bryant-Greene Freelance web developer http://jasper.bry

Re: Table names with periods

2005-10-03 Thread Jasper Bryant-Greene
appears MySQL will not accept periods. Have your cron script replace the periods in the IP addresses with underscores before importing the SQL into MySQL. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http

Re: Joining data from two databases

2005-09-27 Thread Jasper Bryant-Greene
erent databases on the same server. SELECT ... FROM db1.table1 LEFT JOIN db2.table2 WHERE ... ? -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[

Re: ORDER BY for ints

2005-09-27 Thread Jasper Bryant-Greene
) NOT NULL default '0', PRIMARY KEY (`id`), KEY `season` (`season`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | It now looks like mysql is returning the correct thing (at least on the command line), but for some reason inside php it's all screwedup What column are you ordering

Re: Another LOAD Infile Problem

2005-09-26 Thread Jasper Bryant-Greene
s) before doing LOAD DATA INFILE? -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: LOAD DATA INFILE Syntax Error

2005-09-26 Thread Jasper Bryant-Greene
error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@d,@d ,LOCNAME,LOCTYPE,@d,STATE,COUNTY,@d,@d,LNG,LAT,@d,@d,@d,@d,@d,@d,@d,@d)' at line 5 This error is driving me nuts! Any help would be appreciated, as this is a

Re: money fields

2005-09-26 Thread Jasper Bryant-Greene
on, for example with monetary data." [1] http://en.wikipedia.org/wiki/Floating_point [2] http://dev.mysql.com/doc/mysql/en/numeric-types.html -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysq

Re: mysql process 99.9 percent

2005-09-26 Thread Jasper Bryant-Greene
MySQL doesn't have anything to do with hyperlinks and searching (well, not searching at the user-level, anyway). It only knows about SQL queries. So if something's making it go slow, the culprit is an SQL query, not a hyperlink. Please always reply to the list, not just to me. -- Jaspe

Re: mysql process 99.9 percent

2005-09-26 Thread Jasper Bryant-Greene
What programming language/API? What MySQL version? What OS/platform? How much load is on your database from other users, if any? What is the query being executed when the process is at 99.9%? -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing Lis

Re: mysql_real_escape_string question

2005-09-22 Thread Jasper Bryant-Greene
the different quoting formats between DBs. i.e. when you are using MySQL the layer should use mysql_real_escape_string; if you are using another DB it should use that DB's function. This was answered for you on the PHP list. -- Jasper Bryant-Greene Freelance web developer http://jasper

Re: "Lost connection to MySQL server during query" when calling stored procedure

2005-09-22 Thread Jasper Bryant-Greene
Greg 'groggy' Lehey wrote: On Thursday, 22 September 2005 at 17:06:32 +1200, Jasper Bryant-Greene wrote: Jasper Bryant-Greene wrote: Sometimes when I execute this stored procedure ... I get the error "Lost connection to MySQL server during query". I am using MySQL 5.0.1

Re: "Lost connection to MySQL server during query" when calling stored procedure

2005-09-21 Thread Jasper Bryant-Greene
Jasper Bryant-Greene wrote: I have a stored procedure defined as follows: CREATE PROCEDURE `album`.`getUser`( IN userID INT ) READS SQL DATA DETERMINISTIC SQL SECURITY INVOKER SELECT * FROM users WHERE id=userID LIMIT 1; Sometimes when I execute this stored procedure with, for

Re: select first then insert (same table)

2005-09-21 Thread Jasper Bryant-Greene
number of your questions will be answered there. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: "Lost connection to MySQL server during query" when calling stored procedure

2005-09-21 Thread Jasper Bryant-Greene
Daniel wrote: What API are you using to call the SP from--PHP mysqli, Perl DBD-mysql, etc.? PHP MySQLi Jasper Bryant-Greene wrote: I have a stored procedure defined as follows: CREATE PROCEDURE `album`.`getUser`( IN userID INT ) READS SQL DATA DETERMINISTIC SQL SECURITY

Re: "Lost connection to MySQL server during query" when calling stored procedure

2005-09-21 Thread Jasper Bryant-Greene
o I fix it!? ;) Most probably, a server crash... Can you be a little bit more specific please? The MySQL server is working absolutely fine for everything else and also continues to respond to connections and queries perfectly after getting that error. Thanks -- Jasper Bryant-Greene Freelance web deve

"Lost connection to MySQL server during query" when calling stored procedure

2005-09-21 Thread Jasper Bryant-Greene
the error "Lost connection to MySQL server during query". This only ever happens with stored procedures, never with any normal kind of query. I am using MySQL 5.0.12-beta-log on Gentoo Linux x86. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/

Re: Partial string matching between columns, tables

2005-09-20 Thread Jasper Bryant-Greene
Yvan Strahm wrote: I have a varchar column 's1' in table t1. And a varchar column 's2' in table t2. Do you know how one could do something like this: select * from t1,t2 where t1.s1 like %t2.s2 SELECT * FROM t1, t2 WHERE t1.s1 LIKE CONCAT('%', t2.s2) (unt

Re: Inserting information into multiple tables and problems

2005-09-20 Thread Jasper Bryant-Greene
n key constraint 3/ Create a row in VS_PO_NUMBER where VCS_PO_NUMBER_PK is equal to 0 You should probably take option 1 if possible. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: Inserting information into multiple tables and problems

2005-09-20 Thread Jasper Bryant-Greene
OARD_TYPE) VALUES(INPUT MODULE N12310); ERROR 1064: You have an error in your SQL syntax near 'MODULE N12310)' at line 1 Did you mean: INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES('INPUT MODULE N12310'); -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.na

Re: Inserting information into multiple tables and problems

2005-09-20 Thread Jasper Bryant-Greene
NTO' at line 2 You need to end each INSERT INTO statement with a semicolon (;), not a comma (,). Also pressing after each one will allow you to easier diagnose any problems that might come up. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL Gene

Re: Yet another null question

2005-09-18 Thread Jasper Bryant-Greene
t. If you want symmetric results from closed=1 and closed<>1 then you should declare the column as NOT NULL (or not make use of NULL values, but the former is preferable). Either that, or reformulate your query to specify what you really mean: SELECT * FROM new_payments WHERE closed<>1

Re: Select ALL rows with WHERE statement

2005-09-17 Thread Jasper Bryant-Greene
retrieve only records with that year in the table. If it's not passed then it will retrieve the whole table by omitting the WHERE clause. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysq

Re: Creating a string from a resultset directly in SQL ?

2005-09-16 Thread Jasper Bryant-Greene
estion is : is there anyway to do this in one request or do I have to browse my recordset and build my list using my favorite programming tool ? Take a look at the GROUP_CONCAT function, under "functions for use with GROUP BY clauses" in the MySQL manual. You'll need MySQL 4.1+ AFAIK.

Re: Problem with symbolic link

2005-09-16 Thread Jasper Bryant-Greene
Jasper Bryant-Greene wrote: Vlad Shalnev wrote: Periodically I get error message "can't get stat of xxx.MYD" for tables that are symbolic link to tables on different database on the same file system. Error disappear after executing "flush tables". Why are you d

Re: Problem with symbolic link

2005-09-15 Thread Jasper Bryant-Greene
n other databases in your SQL queries so what is the point of making symbolic links to tables in other databases? Is it even supported? -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysq

Re: Newbie MySQL/PHP question re output formatting

2005-09-13 Thread Jasper Bryant-Greene
As stated by a previous poster to this thread, you shouldn't rely on PHP's automagical conversion of nonexistent constants to strings. The extra curly braces { } would also likely cause an error in the function params, and are extraneous even if they don't. -- Jasper Bryant-Greene Fre

Re: MyISAM and InnoDB co-existance

2005-09-13 Thread Jasper Bryant-Greene
recommend that if you are running a MySQL server in a production environment you familiarise yourself with the above manual, or you *will* run in to problems. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http

Re: MyISAM and InnoDB co-existance

2005-09-13 Thread Jasper Bryant-Greene
admin tool. Tables for which you don't select that will be MyISAM. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to

Re: "Operand should contain 1 column" error

2005-09-12 Thread Jasper Bryant-Greene
M members -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- MySQL General Mailing List For

Re: ETA and progress of full-text indexes on INNODB?

2005-09-12 Thread Jasper Bryant-Greene
Kevin Burton wrote: Anyone know the ETA of having full-text index support on INNODB? "Some time in 2006" -- http://www.innodb.com/todo.php -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list arch

Re: HTML in MySQL?

2005-09-11 Thread Jasper Bryant-Greene
Jasper Bryant-Greene wrote: John Trammell wrote: $input = "This is the \n input";# value from user $saved = "This is the input"; # value in database $recovered = "This is \n the \n input"; # retrieved from db, != $input Please don't top-post. T

Re: HTML in MySQL?

2005-09-11 Thread Jasper Bryant-Greene
ot;)); print(nl2br($array['my_field'])); ?> works exactly as intended. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: HTML in MySQL?

2005-09-08 Thread Jasper Bryant-Greene
See http://www.php.net/mysql_real_escape_string HTH -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- MySQL Gene

Re: HTML in MySQL?

2005-09-08 Thread Jasper Bryant-Greene
he appropriate size for the size of your HTML pages, and then store the HTML as a string in that field. Then retrieve it and output the string with PHP. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a po

Re: Merging two tables which contain passwords with different encryption methods

2005-09-05 Thread Jasper Bryant-Greene
; plain text ---> MD5ed password The first link in that chain is mathematically impossible (even if you never saw the plain text password, it would have to get to that stage in order to be put through the MD5 algorithm). -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.na

Re: Merging two tables which contain passwords with different encryption methods

2005-09-05 Thread Jasper Bryant-Greene
m until they do. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- MySQL General Mailin

Re: leading whitespace on orderings

2005-08-31 Thread Jasper Bryant-Greene
Tim McIntyre wrote: Can anyone tell me the best way to ignore leading whitespace on orderings? ORDER BY LTRIM(colname) ? -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose

Re: DIV-function?

2005-08-31 Thread Jasper Bryant-Greene
Joachim Klöfers wrote: Jasper Bryant-Greene schrieb: Gustav Wiberg wrote: Hi there! I wonder how I'll get a div-function in SQL? I dunno, maybe by looking in the manual? From [1]: Division: mysql> SELECT 3/5; -> 0.60 [1] http://dev.mysql.com/doc/mysql/en

Re: DIV-function?

2005-08-29 Thread Jasper Bryant-Greene
Gustav Wiberg wrote: Hi there! I wonder how I'll get a div-function in SQL? I dunno, maybe by looking in the manual? From [1]: Division: mysql> SELECT 3/5; -> 0.60 [1] http://dev.mysql.com/doc/mysql/en/arithmetic-functions.html -- Jasper Bryant-Greene Freelance web dev

Re: Mark a single row?

2005-08-29 Thread Jasper Bryant-Greene
ION UPDATE table SET preferred=0 UPDATE table SET preferred=1 WHERE column_id=1234 COMMIT -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice wa

Re: Storing underscores ( _ ) in database tables

2005-08-26 Thread Jasper Bryant-Greene
David Blomstrom wrote: I'm still stuck on the problem I asked about a day or two ago. I'm working on a page at http://www.geozoo.org/stacks/ that draws data from a table that lists animal taxons (orders, families, species, etc.) in a child-parent relationship. It works exactly the way it should

Re: Problems (URGENT)

2005-08-22 Thread Jasper Bryant-Greene
tai huijia wrote: I'm a new user for MYSQL and I face problem adding mysql database. After typing: SHOW DATABASES; I got this: +--+ | Database | +--+ | test | +--+ 1 row in set (0.02 sec) which does not contain mysql and tmp as shown: +--+ | Database | +

Re: MySQL REGEXP problems...

2005-08-22 Thread Jasper Bryant-Greene
John thegimper wrote: Thanks so there is no operator that tells mysql that both words must match? "one|two" is equal to "one OR two" I want an operator that is equal to "one AND two" but i guess i will have to use match in boolean mode for that? Why not use full-text searching instead of rege

Re: need help with foreign keys, new to mysql

2005-08-20 Thread Jasper Bryant-Greene
Yes but is the MySQL daemon running as root? I hope it isn't... Jasper John Gonzales wrote: i am logged in as root -JG. -Original Message- From: Kishore Jalleda [mailto:[EMAIL PROTECTED] Sent: August 19, 2005 10:35 PM To: John Gonzales Cc: mysql@lists.mysql.com Subject: Re: need hel

Re: ADDING MYSQL DATABASE

2005-08-19 Thread Jasper Bryant-Greene
tai huijia wrote: SHOW DATABASES; I got this: +--+ | Database | +--+ | test | +--+ 1 row in set (0.02 sec) which does not contain mysql and tmp as shown: You need to log in (to MySQL) as root if you want to see the mysql database. It contains sensitive information

Re: Query on Full-text search

2005-08-19 Thread Jasper Bryant-Greene
Rakki wrote: Hi, Can anybody give me the optimized query for full-text searching? User will be entering one or more words in a text box and I wanted to display the records which has atleast one word of the user input. Assume that my table has two fields USER and DESCRIPTION. I wanted to

Re: Commit needed even after a select statement ??

2005-08-18 Thread Jasper Bryant-Greene
Sujay Koduri wrote: hi, i am using MysQL4.1.13. I tried doing the following. * Open a new session to DB. (Say session 1) * Using prepared statements provided by C API, issued a select statement to get some rows from a table. * This worked absolutely fine. * I didnt clo

Re: INSERT record IF NOT EXISTS?

2005-08-17 Thread Jasper Bryant-Greene
Daevid Vincent wrote: Does mySQL have a way to INSERT a new record if one doesn't exist (based upon primary compound key)? I see this "EXISTS" but not an example of how to use it with INSERT. I see "INSERT... ON DUPLICATE KEY UPDATE col_name=expr" which is very close, but I want it to do nothin

Re: character encoding

2005-08-16 Thread Jasper Bryant-Greene
Karima Velasquez wrote: uhmmm... i'll give a try to mysql_real_escape_string(), which i understand formats the data into a valid sql string (without any special characters, like \ and ' ). shoud i use an analog function when retriving the data? because if i "encode" the data, shouldn't i "deco

Re: Dates & Schedule Problems

2005-08-14 Thread Jasper Bryant-Greene
C.F. Scheidecker Antunes wrote: Question one: Now, how can I return a calendar of the dates where the TA is AVAILABLE, that is the oposite of what is recorded? I want a list of all the available days and times by substracting the non available times recorded in the table. I guess I would need t

Re: too many connections

2005-08-11 Thread Jasper Bryant-Greene
Joeffrey Betita wrote: hello i just installed mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz, httpd-2.0.54.tar.gz, php-5.0.4.tar.gz etc. on a Intel(R) Pentium(R) 4 CPU 2.40GHz with 1GB RAM this is just a temporary until we buy a new high end server. my-large.cnf is the configuration in the /

Re: Storing manually diggested Passwords with MD5

2005-08-11 Thread Jasper Bryant-Greene
C.F. Scheidecker Antunes wrote: I will have the password stored in the database with MD5. What I actually need is a manual way to get the password back, that is decoding it. The whole point of MD5 is that you cannot decode it once encoded. When someone enters their password, just MD5 what th

Re: query - select from one, update another

2005-08-08 Thread Jasper Bryant-Greene
Michael Stassen wrote: Not exactly. They aren't the same. COUNT(id) counts distinct values of id, while COUNT(*) simply counts rows. [snip] Actually, COUNT(id) counts non-NULL values of id. COUNT(DISTINCT id) would count distinct values. http://dev.mysql.com/doc/mysql/en/group-by-functi

MySQL optimisations for search engine

2004-01-30 Thread Jasper Bryant-Greene
a different method - the words table has over 1,700,000 rows. Thanks > Jasper Bryant-Greene > Cabbage Promotions > <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] > <http://fatalnetwork.com/> http://fatalnetwork.com/ > US: +1 (509) 691 3287 > NZ: +64 (21) 232 3303