RE: Problem with master/slave replication

2007-11-16 Thread Mike Johnson
unning Seconds_Behind_Master -- Mike Johnson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: MySQL - Replication (Master/Slave) Question

2007-11-15 Thread Mike Johnson
From: Dan Rogart [mailto:[EMAIL PROTECTED] > On 11/14/07 4:01 PM, "Mike Johnson" > <[EMAIL PROTECTED]> wrote: > > > Correction to a couple of replies I've seen -- a slave > > server can have more than one master, but not to the same > > databa

RE: MySQL - Replication (Master/Slave) Question

2007-11-14 Thread Mike Johnson
;d have to check on that. Not likely, though. As for how to set it all up, don't ask me. I just enjoy the results. :) (apologies if you get a dupe, Baron -- I accidentally hit reply, not reply-to-all) -- Mike Johnson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

recursion or something recursion-esque

2007-09-24 Thread Mike Johnson
ipulate queries I'll be a whole lot happier. Any thoughts? I feel like the solution is either remarkably simple or frustratingly difficult. Thanks in advance if you can help! -- Mike Johnson Smarter Travel Media LLC Applications Developer http://www.smartertravel.com/ -

RE: 4.1 and unions

2005-08-04 Thread Mike Johnson
ECT * FROM table) Oh, interesting. My next question was going to be if the second syntax is correct (all subqueries enclosed in parens), but looks like it's good. Thanks, Scott. -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL P

4.1 and unions

2005-08-04 Thread Mike Johnson
x27;d be much obliged. Thanks! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: DB design question

2005-05-24 Thread Mike Johnson
From: Mike Johnson [mailto:[EMAIL PROTECTED] > From: Koon Yue Lam [mailto:[EMAIL PROTECTED] > > > the problems is, when I want to query both student, address > > and phone num, the sql will be > > > > select * from student s, address a, phone_num n > &

RE: DB design question

2005-05-24 Thread Mike Johnson
me, s.age, a.street_name, n.num, n.extension FROM students s JOIN address a ON a.student_id = s.student_id JOIN phone_num n ON n.student_id = s.student_id HTH! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

same-table join

2005-05-11 Thread Mike Johnson
id` that have a 'foo' action but not a 'baz' action (those being b and c). I know I know the answer to this, but I'm drawing a blank at the moment. Thanks in advance if someone could give me a hand. -- Mike Johnson Smarter Living, Inc. Web Developer

RE: Query Performance

2005-04-14 Thread Mike Johnson
change the table structure or the query). > > Thank you ! Oh, I'm sorry. I read your CREATE statement too quickly the first time and didn't notice that the `time_result` index was across both `time` and `result`. In that case, indexing `result` separately may not help at all. Mig

RE: Query Performance

2005-04-14 Thread Mike Johnson
at column. Give it a shot, though, I imagine it'd definitely help. If that doesn't drastically improve it, I'd also look into a way around performing the date and time functions in the query. I don't know if that's possible, but depending on what this is feeding to (most lik

RE: Passing Arrays between pages

2005-03-22 Thread Mike Johnson
ed to construct the array elements as their own hidden values. echo ""; echo ""; echo ""; At that point, if you call: echo $kcompany[1]; after the form submit, you'll get Banana. HTH! -- Mike Johnson Smarter Living, Inc. Web Developer

RE: LOAD DATA INFILE Opposite

2005-02-15 Thread Mike Johnson
of my PHP > application to donwload? > > Thanks for your help SELECT ... INTO OUTFILE is what you want. It's sort of covered in the SELECT syntax documentation: http://dev.mysql.com/doc/mysql/en/select.html Pretty handy at times. HTH! -- Mike Johnson

RE: DATE problem

2005-02-01 Thread Mike Johnson
table WHERE DATE_FORMAT(table.created, '%Y-%m-%d') = CURDATE(); Should do what you're looking for. HTH! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: What's MYSQL equivalent to Oracle's TRUNC(date_time_var)?

2004-11-12 Thread Mike Johnson
c/mysql/en/Date_and_time_functions.html Also, as of 4.1.1, you can use DATE(date_time_var) to return the date portion. HTH! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smarterliving.com [EMAIL PROTECTED] (617) 886-5539 -- MySQL General Mailing List F

RE: Suppress the 0 value

2004-11-10 Thread Mike Johnson
From: Mike Johnson [mailto:[EMAIL PROTECTED] > From: Martin Rytz [mailto:[EMAIL PROTECTED] > > > Hi MySQL-Users > > > > I have a simple select statement like 'select id from table'. > > The result is 0, becaues the id field is 0 (int-field). > >

RE: Suppress the 0 value

2004-11-10 Thread Mike Johnson
0 as the result (i.E. everytime the result from the select > is 0 it should be NULL). > > How can this be done within the select-statement? SELECT IF(id = 1, NULL, id) AS id ... The usage of IF() is IF(expression, true value, false value). -- Mike Johnson

RE: Help with a DATETIME Query Please Using 3.23.54

2004-11-04 Thread Mike Johnson
0-31 09:00:00', you end up with 25 (which I think is what you were looking for, not 24). As I said, there may be a more elegant way to do that, but this is the brute-force method that should work. HTH! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smarterliving.com [EMAIL PROTECTED] (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Converting date in MySQL

2004-10-14 Thread Mike Johnson
're not using 4.1.1, you're better off setting the format in the calling script. You'd assumedly need to do some error-checking, anyway. -- Mike Johnson Smarter Living, Inc. Web Developerwww.smarterliving.com [EMAIL PROTECTED] (617) 886-5539 -- MySQL G

RE: Sanity Check : Error in sql

2004-08-26 Thread Mike Johnson
dering and running (after I post) if type > is a no-no-word. Try wrapping Value in single- or double-quotes in your code. It sounds like it's essentially generating this query: Select * from Education_table where TypeID = HS; instead of... Select * from Education_table where TypeID = &#

RE: distinct based on two fields--please help

2004-08-03 Thread Mike Johnson
result > > name price type > A 30 1 > B 50 2 > > How do I do this with one sql query? Thanks. SELECT name, SUM(price), type FROM tablename GROUP BY name, type; -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- My

RE: Finding duplicate values in a column

2004-07-28 Thread Mike Johnson
From: Mike Johnson > From: Robert Reed [mailto:[EMAIL PROTECTED] > > > This seems like it should be easy, and I'd be happy > > for a simple reference to where in the manual or in > > Paul's book I can find the answer. I am wanting to > > find ba

RE: Finding duplicate values in a column

2004-07-28 Thread Mike Johnson
.23.54? > > Thanks in advance Try this: SELECT date_created, COUNT(*) AS num FROM tablename GROUP BY date_created HAVING num > 1; HTH! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

RE: MySQL -- SQL syntax error.....

2004-06-16 Thread Mike Johnson
regard. Try this: UPDATE BUSINESS_CATEGORY SET BUSINESS_CATEGORY.BUS_CAT = 'JUNKKK', BUSINESS_CATEGORY.BUS_DESC = 'JUNK123KK' WHERE BUSINESS_CATEGORY.BUS_CAT_ID = '733788' -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Create table syntax question

2004-06-16 Thread Mike Johnson
manual and > can't spot what I've done wrong. Anyone? I'm willing to bet that it's because DESC is a reserved word (an abbreviation of DESCRIBE, used to show a table structure). Either change the name of that column or wrap it in backticks (`DESC`) whenever it's refe

RE: Very Strange data corruption

2004-05-25 Thread Mike Johnson
ky, I just don't want to confuse anyone out there. While we're being picky, then, the first timestamp field is actually updated on any INSERT or UPDATE, not just given a value on the initial INSERT. :) -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- My

RE: Very Strange data corruption

2004-05-25 Thread Mike Johnson
se. Someone correct me if I'm wrong, but isn't it considered best practice to validate data before it gets to the database? I can't seem to find a source for this after a quick search on Google, though... -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539

RE: Very Strange data corruption

2004-05-25 Thread Mike Johnson
> Version 4.0.15 > > If I change the first digit of the input from a 6 to any > other digit, it > gets entered correctly. Any idea what is going on here!? > > Version 4.0.15 The max value of INT is 2147483647, lower than the value you're inserting (even when unsigned, whi

RE: php mysql problem

2004-05-13 Thread Mike Johnson
can Fix this problem? Thanks Sounds as though PHP was installed without the MySQL library. I haven't done it myself in a while, but I believe it requires the --with-mysql flag. HTH -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing Li

RE: Need correct 'order by' syntax where field does not contain "NULL"

2004-05-04 Thread Mike Johnson
_ord | +---+---+--+ | c | 1 | 1 | | f | 2 |2 | | e | 3 |3 | | a | NULL | 99 | | b | NULL | 99 | | d | NULL | 99 | +---+---+--+ 6 rows in set (0.00 sec) === If someone knows a better way to do this, I'd be curious to hear it. I imagine there's a more efficient way to do it, but I can't seem to stumble upon it. Anyway, hope this helps. :) -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: urban myth?

2004-05-03 Thread Mike Johnson
7;s definitely not to be relied on, though. If this is documented online, I've yet to see it (though I haven't exactly gone looking for it). Someone else may have a more accurate description of the way it's done, though. -- Mike Johnson Web Developer Smarter Living, Inc. p

RE: WHERE clause problem

2004-05-03 Thread Mike Johnson
uates to 1, because it's just ORing two integers. Note that it's returning exactly what it's supposed to be returning, the date in January. So while it may look like it makes sense in pseudo-code, on paper it's not how MySQL evaluates things. It builds the right side of the equality

RE: Query help

2004-04-26 Thread Mike Johnson
nstead of the default: SELECT e.name, e.date, s.name FROM event e LEFT JOIN sponsor s ON e.sponsor_ID = s.ID HTH! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: re-using a results set

2004-04-22 Thread Mike Johnson
n an hour or two, will simply resend their message again and again until someone boils over. Sorry about my hasty reply. :) -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: re-using a results set

2004-04-21 Thread Mike Johnson
ld you possibly provide more details for your situation? Your code is a bit jumbled. We have no idea what pv() does, for instance. Nor db_query(). These are not standard PHP functions, so you'll have to forgive us if we're all a bit clueless and unwilling to help. -- Mike Johnson Web Devel

RE: If() syntax question

2004-04-21 Thread Mike Johnson
From: Don Dachner [mailto:[EMAIL PROTECTED] > Is it possible to do something like this? > > If(select * from xxx, "if record found"..update it, "if > record not found" ..insert it) Try the REPLACE INTO syntax: http://dev.mysql.com/doc/mysql/en/REPLACE.html

RE: Query with IF acting wierd.

2004-03-11 Thread Mike Johnson
From: Mike Johnson > SELECT main.id, > IF(main.type,categories.name,items.name), > IF(main.type,"cat","item") AS type > FROM main, IF(main.type,items,categories) WHERE > IF(main.type,categories.id,items.id)=main.id; Oh, my mistake. I just realized I reve

RE: Query with IF acting wierd.

2004-03-11 Thread Mike Johnson
n only on /either/ items or categories. I never knew you could use an IF clause to specify a column in a WHERE clause, though, so maybe this will work. It's worh a shot at least. HTH! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Security

2004-03-11 Thread Mike Johnson
update or view records /through the web app/ relating to them. So long as you never select records for Customer B, Customer A will never have the ability to view or modify Customer B's records. Does that make any more sense? -- Mike Johnson Web Developer Smarter Living, Inc. pho

RE: Security

2004-03-10 Thread Mike Johnson
27;s simply not built as a multi-user transactional client for limiting access to data in commonly-used tables. It begs the question why you're giving your clients access to the native mysql client itself rather than developing an application to do this, in which you could quite easily limit suc

RE: disabling optimizations to identify slow queries

2004-02-24 Thread Mike Johnson
s). More info here: http://www.mysql.com/doc/en/Query_Cache_Status_and_Maintenance.html And here: http://www.mysql.com/doc/en/SELECT.html HTH! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysq

RE: How do I unsubscribe

2004-02-17 Thread Mike Johnson
From: Tim V [mailto:[EMAIL PROTECTED] > How do I unsubscribe? This message should have a "To unsubscribe" link at the bottom (if you haven't already noticed it on every other message you receive). -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539

RE: What replaces IN?

2004-02-06 Thread Mike Johnson
id IN (select item_id from table2) IN has been supported for a while, but subselects have not. SELECT * FROM table1 WHERE item_id IN (1, 2, 3, 4, 5) should work, but not a subselect. I'm not sure of subselect syntax, actually, or what (recent) version in which it was introduced. --

RE: Query matching

2004-02-06 Thread Mike Johnson
og.company = pages.company AND changelog.magazine = pages.magazine AND changelog.orig_id IN ( pages.mls_1, pages.mls_2, pages.mls_3, pages.mls_4, pages.mls_5, pages.mls_6, pages.mls_7, pages.mls_8, pages.mls_9, pages.mls_10, pages.mls_11, pages.mls_12 ); -- Mike Johnson Web

RE: Just simple question...

2004-02-06 Thread Mike Johnson
asier than it may seem -- one of those "easy to learn, a lifetime to master" things. However, if you're turned off by having to either work on the command-line console or run a local webserver to use a GUI, I can't say that MySQL is necessarily what you're looking for. Good

RE: What field lengths to use

2004-02-06 Thread Mike Johnson
oesn't have a user-set limit on it: http://www.mysql.com/doc/en/BLOB.html If all the records going in the column are 10 characters, use a CHAR(10): http://www.mysql.com/doc/en/CHAR.html HTH! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539

RE: Mysql error message

2004-02-04 Thread Mike Johnson
number "040205" tomorrow (those being today's and tomorrow's dates, respectively). Can you elaborate on the problem? Where do you get this error? -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives:

RE: Newbie query question...

2004-02-04 Thread Mike Johnson
r_cat ON events.cat=calendar_cat.cat_id WHERE year>=YEAR(CURDATE()) AND month>=MONTH(CURDATE()) AND day>=DAYOFMONTH(CURDATE()) AND (cat_id='2' OR cat_id='5') ^^ AND approved='1' ORDER BY year,month,day ASC Previously, it was going

RE: HELP! Select queries for tables that has fields with # characters

2004-01-29 Thread Mike Johnson
t seem to even create a table with a column with a # in the name. However, have you tried enclosing the column name in backticks? SELECT * FROM table WHERE `FILE#`=1332; -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives:

RE: Error: 1062 Duplicate Entry '252' for key 1

2004-01-29 Thread Mike Johnson
From: Mike Mapsnac [mailto:[EMAIL PROTECTED] > Thanks for explanation. > > But I don't insert anything at all to the SLAVE. It is 100%. > > Can the problem be problem be relative to Mysql 4.0.13 ? > > Thanks Out of curiosity, what's the data type of this

RE: Paging!

2004-01-29 Thread Mike Johnson
From: Dan Greene [mailto:[EMAIL PROTECTED] > another option is to set your pager option: > > mysql> pager more > > then re-run your query Wow. You learn something new every day. Thanks! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL Ge

RE: Paging!

2004-01-29 Thread Mike Johnson
From: Mike Johnson > From: Adel Ardalan [mailto:[EMAIL PROTECTED] > > > When I select a rather large table to be shown, the rows are > > going very fast and I can't see the rows at the beginning. > > Also, I can't scroll up. How can I view the results pag

RE: Paging!

2004-01-29 Thread Mike Johnson
arge amounts of data. Are you using any sort of frontend with this database? PHP, Perl, Java, etc? -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Read Slaves, and load balancing between them...

2004-01-29 Thread Mike Johnson
osition on the master and slave(s). I'm not sure if such a load will cause a temporary discrepancy, but it's the first thing that comes to mind. -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Read Slaves, and load balancing between them...

2004-01-29 Thread Mike Johnson
of itself before notifying you, just to see if it needs to catch up. HTH! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Selecting by date

2004-01-16 Thread Mike Johnson
te, you might want to use CURDATE() instead of NOW(), as NOW() returns the full -mm-dd hh:ii:ss stamp (whereas CURDATE() returns just -mm-dd). MySQL handles it silently just fine, but it's a good habit to get into. -- Mike Johnson Web Developer Smarter Living, Inc. phone (61

RE: grants for START/STOP SLAVE

2004-01-15 Thread Mike Johnson
From: Paul DuBois [mailto:[EMAIL PROTECTED] > At 11:31 -0500 1/15/04, Mike Johnson wrote: > >This is in reference to 4.0.16, FWIW... > > > >I can't find any direct references to the actual grant permission > >for controlling a slave thread in the online docs. T

grants for START/STOP SLAVE

2004-01-15 Thread Mike Johnson
ileging the user, which I'd like to avoid if possible. Can anyone confirm that it's SUPER that grants permissions for START/STOP SLAVE? Is this actually documented anywhere? Thanks in advance! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL Ge

RE: Question about IF statements...

2004-01-14 Thread Mike Johnson
is > 0.00...so where the results that > total 0.00 don't appear at all. > > I am sure I am missing something...thanks for any help! SELECT project_id, IF (SUM( time_worked ) > '0.00', SUM( time_worked ),'NULL') AS total FROM time_daily WHERE user_id =

RE: MYSQL problem

2004-01-13 Thread Mike Johnson
ot;--with-mysql=xxx" argument? If that checks out, scroll further down to view information about PHP's planned interactions with MySQL. HTH! -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Implement one statement w/o subqueries.

2004-01-13 Thread Mike Johnson
Thanks. Ruslan. > > PS: MySQL 4.0.x I believe you just need to join the Properties table twice: SELECT I.id, I.Name, P2.Name, P2.Value FROM Properties P1 INNER JOIN Items I ON I.id=P1.Item INNER JOIN Properties P2 ON P2.Item=I.id WHERE P1.Name='Color' AND P1.

RE: Using BETWEEN or <= >=

2004-01-13 Thread Mike Johnson
;salary'] = salary of individual posted from a form Have you tried this? $sql = " SELECT * FROM federal-married WHERE {$_POST['salary']} BETWEEN start AND end "; -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Moving Bookmark Table Data

2004-01-13 Thread Mike Johnson
ate, NULL AS date, 0 AS childof, NULL AS id, 0 AS deleted FROM apb_bookmarks; I'm assuming that by "these are the only field mappings that I care about," you mean that those are the only fields you want brought over. If not, then replace the NULLs and 0s with the proper fiel

RE: Strange ORDER BY question(SOLUTION)

2004-01-12 Thread Mike Johnson
#x27; DESC, > MemberLevel='Paying' DESC, > MemberLevel='Non-Paying' DESC; > > > Thanks again Mike! Thanks for posting it, actually, as I wasn't aware of that solution until your question prompted me to go looking. -- Mike Johnson Web Developer

RE: Strange ORDER BY question

2004-01-12 Thread Mike Johnson
values instead, possibly renaming the MemberLevel column to MemberLevelRank for clarity, and then join on that table in order to sort in their ranked order: SELECT tablename.*, MemberLevels.description FROM tablename, MemberLevels WHERE tablename.MemberLevelRank=MemberLevels.rank ORDER BY Membe

RE: Get counts of col=value with an GROUP BY clause?

2004-01-05 Thread Mike Johnson
f my SQL is a bit compacted or tough to read. It makes sense to me because I wrote it piece-by-piece, but I imagine it doesn't look so simple to someone else. :) I'm not sure of any standards for nested functions and control structures such as that. Anyone have any input on that? --

RE: Basic error

2003-12-17 Thread Mike Johnson
gt; } > print "\n"; > mysql_close( $link ); > === Have you tried including $link as a second argument in mysql_query()? mysql_query( "select * from domains", $link ); IIRC, it's not necessary, but it might be worth a shot. -- Mike Johnson Web Developer/Systems Asst. Smarter Living, Inc. phone (617) 497-2500 x226 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Variable names, colum names

2003-12-17 Thread Mike Johnson
better match up to the db table structure. On the plus side, if you add a column to the db, all you need to do is add a field of the same name to the HTML form. In a nutshell, while it's useful to do things like abstract the construction of the query, it's often not worth the trouble.

RE: missing something obvious w/grant statement length?

2003-12-16 Thread Mike Johnson
From: Paul DuBois [mailto:[EMAIL PROTECTED] > At 13:29 -0500 12/16/03, Mike Johnson wrote: > >From: Ari Davidow [mailto:[EMAIL PROTECTED] > > > >> I seem to have run into a problem with a host name that > >> incorporates a hyphen: > >> > &g

RE: missing something obvious w/grant statement length?

2003-12-16 Thread Mike Johnson
t; a hostname with a hyphen, for instance. Can someone help? The syntax is a bit weird for GRANT statements; either side of [EMAIL PROTECTED] are two separate args to be stored in two separate columns. This should work... GRANT ALL ON *.* TO 'me'@'mysite-dev.foo.com' ID

RE: sending array data using php mail

2003-12-10 Thread Mike Johnson
n there -- the closing curly brace is missing. echo "{$row["Password"]}\n"; ^ Also, I've never tried this syntax with double-quotes. Do the curly braces keep the PHP parser from thinking that the opening " for Password is a close of the string? I

RE: sending array data using php mail

2003-12-10 Thread Mike Johnson
; $Body .= "$newvalue\n"; } $From = "$HP"; mail( $OwnnerMail,$Subject, $Body, "From: $From"); See how $Body is initialized before the while() loop, and then appended to using .= inside the loop? Once the

RE: New to joins - this simple one doesn't work.

2003-12-09 Thread Mike Johnson
aunch, that he wants to go back to a variable # of images per property. In that case you'd be right back at the drawing board. If you build it that flexible from day one, though, he can change his mind to his heart's content. Anyway, good luck! -- Mike Johnson Web Developer/Systems Asst.

RE: LOAD DATA LOCAL INFILE

2003-12-09 Thread Mike Johnson
"Text field with "","" a comma between quotes",1.2,44 I believe it's... LOAD DATA LOCAL INFILE '/path/to/file' INTO TABLE tablename FIELDS TERMINATED BY ',' OPTONALLY ENCLOSED BY '"'; -- Mike Johnson Web D

RE: New to joins - this simple one doesn't work.

2003-12-09 Thread Mike Johnson
HERE reference_number=[reference_number]; (where [reference_number] is from the previous result) If the first query returns nothing, then your problem is that there's no record for properties.country='Spain'. If the second returns nothing, then there's no record for images.referenc

RE: New to joins - this simple one doesn't work.

2003-12-08 Thread Mike Johnson
ing and not an int, then you need to single- or double-quote it. Try this: $Query="SELECT properties.area, images.image_filename FROM properties, images WHERE properties.reference_number=images.reference_number AND properties.area='$id'"; HTH! -- Mike Johnson Web Developer/S

RE: stopping or aborting a long query

2003-12-04 Thread Mike Johnson
It was probably 3.23 at that point (we recently upgraded to 4, but haven't done much to warrant the situation since). The status for the process usually says 'killed' if that helps. -- Mike Johnson Web Developer/Systems Asst. Smarter Living, Inc. phone (617) 497-2500 x22

RE: mean/median/mode

2003-12-04 Thread Mike Johnson
should return for a set of data of an even number, actually. The middle two? Or should it pick one? Good luck either way. -- Mike Johnson Web Developer/Systems Asst. Smarter Living, Inc. phone (617) 497-2500 x226 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Problem request can be resolved in the next versions

2003-12-03 Thread Mike Johnson
not entirely sure of what you're aiming for, so I don't know if that above query works. If not, try looking at the manual. INSERT...SELECT syntax http://www.mysql.com/doc/en/INSERT_SELECT.html JOIN syntax http://www.mysql.com/doc/en/JOIN.html -- Mike Johnson Web Developer/Syst

RE: stupid newbie question

2003-11-13 Thread Mike Johnson
ngs -- GRANT ALL ON store.* TO 'admin'@'localhost' If you need help giving GRANT permissions to [EMAIL PROTECTED], let us know or check out: http://www.mysql.com/doc/en/GRANT.html -- Mike Johnson Web Developer/Systems Asst. Smarter Living, Inc. phone (617) 497-2500 x226 --

RE: Limitations on data for default...

2003-11-13 Thread Mike Johnson
le field. You can simply select a timestamp as... SELECT DATE_FORMAT(column, '%Y-%m-%d') AS date ...and get a date just fine. -- Mike Johnson Web Developer/Systems Asst. Smarter Living, Inc. phone (617) 497-2500 x226 -- MySQL General Mailing List For list archives: http://lists.mysql

RE: Dirt Slow Query On Datetime Range

2003-11-11 Thread Mike Johnson
om') AND (AcctStartTime <= '2003-11-11 15:30:00' > AND AcctStopTime > > >= '2003-11-11 15:30:00') His WHERE clause is on two different fields (AcctStartTime and AcctStopTime). I don't think a BETWEEN clause is what's needed... -- Mike Joh

large LOAD DATA INFILE and replication

2003-11-11 Thread Mike Johnson
e, we cannot set SQL_SLAVE_SKIP_COUNTER to go beyond position 649082785. The master is Redhat Linux 9 running MySQL 4.0.15-standard-log, and the slaves are Redhat Linux 7.1 running MySQL 4.0.15-standard-log as well. Has anyone run into this before? -- Mike Johnson Web Developer/Syste

Re: exporting data

2002-08-02 Thread Mike Johnson
Do you mean like 'mysqldump'? You can use mysqldump to dump tables +/- data and then upload it to a database later--or 'import' it, e.g., mysqldump -u all the tables from that database. mysqldump takes a variety of arguments. see 'man mysqldump' for more info. -mj Desmond Lee wrote: >