Re: Merging deltas from one table to another?

2010-03-10 Thread Don Read
/tmp/db.sql ... -- Don Readdon_r...@att.net It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: Split query result into two part

2010-01-09 Thread Don Read
, -- Don Readdon_r...@att.net It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Re: two processes update the same column in short time

2009-12-25 Thread Don Read
', 'scan', 'done') not null default 'new'; When proc two runs, it should UPDATE noticed='scan' WHERE noticed='new' Then repeat the scan with SELECT ... WHERE noticed='scan' ... and finally it should UPDATE domain=whatever, ... noticed='done' Regards, -- Don Read

Re: two processes update the same column in short time

2009-12-25 Thread Don Read
On Sat, 26 Dec 2009 10:43:55 +0800 Eva said: 2009-12-26 2:36, Don Read : Change noticed to enum('new', 'scan', 'done') not null default 'new'; When proc two runs, it should UPDATE noticed='scan' WHERE noticed='new' Then repeat the scan with SELECT ... WHERE noticed='scan

Re: Several languages for content

2009-11-27 Thread Don Read
know or haven't yet found the proper translation for a phrase it will default to the english language. * Note the locale field is varchar(5). There is a de, a de_DE, and a de_CH locale! Have fun! -- Don Readdon_r...@att.net It's always darkest before

Re: ad hoc replication for 3 X 40 000 rows

2009-10-21 Thread Don Read
SET seen='GOT' WHERE seen='GET'; lather, rinse, repeat. -- Don Readdon_r...@att.net It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL General Mailing List For list

Re: Slow query Performance

2009-07-16 Thread Don Read
is that the query runs faster the second time around but i dont have ... snipage -- A: It reverses the normal flow of conversation. Q: What's wrong with top-posting? A: Top-posting. Q: What's the biggest scourge on plain text email discussions? Anybody else see the irony here? -- Don

Re: avoiding use of Nulls (was: The = operator)

2009-03-15 Thread Don Read
invented the things we are talking about (http://en.wikipedia.org/wiki/Edgar_F._Codd) Cheers Claudio Nanni And Claudio for the WIN! -- Don Read donr...@sbcglobal.net It's always darkest before the dawn. So if you are going to steal the neighbor's

Re: query problem

2006-03-12 Thread Don Read
($qry, 'area', $area); if (! empty($interest)) $qry = andclause($qry, 'interest', $interest); echo 'span class=ddt', $qry, '/span'; $res = SQLQuery($qry); ... Have fun. -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you

Re: Calculating User Ranks (SQL Query Question)

2004-12-24 Thread Don Read
()) $rank[$row['user_id']] = $row['rank']; $dbconn-Execute('UPDATE user SET rank=0'); foreach($rank as $id = $r) { $qry = UPDATE user SET rank=$r WHERE user_id=$id; $dbconn-Execute($qry); } } Regards, -- Don Read

Re: Date Indexing

2004-09-23 Thread Don Read
. hittime DATETIME NOT NULL DEFAULT '-00-00', prd MEDIUMINT UNSIGNED NOT NULL DEFAULT 0, ... KEY idx_p (prd), ... UPDATE tbl SET prd=EXTRACT(YEAR_MONTH FROM hittime) ... Then query it with SELECT ... WHERE prd=200408 etc. -- Don Read [EMAIL

Re: What is your mysql debugging strategy?

2004-04-28 Thread Don Read
error near .. very useful or am I giving up to easy? Howzabout : mysql_query($qry) or die(sprintf('pBorked query at file %s line %d :br /%s', __FILE__, __LINE__, nl2br($qry)) .'br /' .mysql_errno() .'br /' .mysql_error()); -- Don Read [EMAIL

Re: Doubt about TINYINT type

2004-04-28 Thread Don Read
mediumint(6) unsigned zerofill NOT NULL auto_increment, idcust mediumint(5) unsigned zerofill NOT NULL, ... ); You can make some pretty decent reports with a shell script if the DB lends a hand with formatting. -- Don Read [EMAIL PROTECTED] -- It's

Re: Query question

2004-04-21 Thread Don Read
A; This return's up to ten characters after the name, somethimes this is to much, sometimes to many. Does anybody knows how to go from here. LEFT(SUBSTRING_INDEX(foo, ';', 1), 10) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So

Re: [Q] moving database to server in new timezone

2004-04-12 Thread Don Read
and run the query: UPDATE tbl SET ts= DATE_SUB(ts, INTERVAL 10 HOUR) WHERE ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL General

Re: How to optimize ugly order by?

2004-03-25 Thread Don Read
(membershiptype + 1, '2', '0', '1') ASC -- or -- MAKE_SET(membershiptype, 'a','b') DESC Regards -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL

Re: counting rows in all tables

2004-03-25 Thread Don Read
On 25-Mar-2004 [EMAIL PROTECTED] wrote: Not using perl or php I came up with: mysqlshow -u user --status db_name | awk -F| '{print $2,$5}' | grep -i pattern Is there a query to do the same thing? SHOW TABLE STATUS -- Don Read [EMAIL PROTECTED

Re: A current row updating counter for a mass Update or similar?

2004-02-10 Thread Don Read
TEMPORARY TABLE Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: COMPOSITE PRIMARY KEY?

2004-02-10 Thread Don Read
-- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Connect to MySQL via PHP

2004-02-10 Thread Don Read
Support section. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: How to determine when a MySQL database was last modified?

2004-02-06 Thread Don Read
update, and then go around all of them at backup time :( Anyone got any other ideas? SHOW TABLE STATUS Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's

RE: Downloading/Exporting delimited text files

2004-02-04 Thread Don Read
while Header(Content-type: text/tab-separated-values); Header(Content-Disposition: inline; filename=data.tsv); echo $output; snip Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal

Re: Very big IN ( $value )

2004-01-28 Thread Don Read
. This is a subselect done in two steps. Look if you could combine/modify your original query (that produced $value) and this query to a single JOIN query. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal

Re: In need of a dummy select statement ...

2003-12-08 Thread Don Read
; - or - SHOW TABLES LIKE 'asdfzxcv1234'; Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table

RE: Mysql server time setting.

2003-11-20 Thread Don Read
with this? In your init script (before the section that calls safe_mysqld) put: TZ=EST; export TZ Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

Re: updating records without changing timestamp fields

2003-10-27 Thread Don Read
[table] SET [timestamp]=[timestamp], ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

Re: LOAD DATA skips records of text file

2003-10-26 Thread Don Read
for clues as to what is missing why. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Don Read
On 19-Sep-2003 Dan Anderson wrote: I am trying to make my PHP script autodetect when a table in a mySQL database exists, and when it doesn't, create it. snip function tableexists($tbl) { $res = @mysql_query(SELECT 1 FROM $tbl); return ($res ? true : false); } Regards, -- Don

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Don Read
On 19-Sep-2003 Don Read wrote: On 19-Sep-2003 Dan Anderson wrote: I am trying to make my PHP script autodetect when a table in a mySQL database exists, and when it doesn't, create it. snip function tableexists($tbl) { $res = @mysql_query(SELECT 1 FROM $tbl); return ($res

Re: how to 'tell' the select what to omit

2003-08-14 Thread Don Read
'. PHP example: echo 'table'; $res=mysql_query('SELECT * FROM TName'); while ($row=mysql_fetch_array($res) ) { unset($row['dateOB'], $row['idSCHOOL']); echo 'trtd', implode('/tdtd', $row), '/td/tr'; } echo '/table'; Regards, -- Don Read [EMAIL PROTECTED

Re: Help with DELETE and a subquery

2003-07-27 Thread Don Read
AS b2 WHERE b1.cid=b2.cid and b1.bid != b2.bid); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql

Re: MySQL multiple query in php script. (newbie)

2003-07-27 Thread Don Read
of '==' and why the commas in your WHERE clause ? $sql = SELECT Realtor, ... WHERE Bathrooms ='$a' AND Bedrooms ='$b' AND ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper

Re: query to find the closest result

2003-07-27 Thread Don Read
specified, and the price where the majver and minver are the largest combination for each iid? See above, --the problem solves itself. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's

Re: How to export db or table structure?

2003-07-27 Thread Don Read
that will export that info to a file without the contents of the tables themselves? $ mysqldump -d dbname Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

Re: about desc command

2003-06-25 Thread Don Read
; Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List For list

Re: Sorting Countries

2003-06-25 Thread Don Read
: SELECT countries_id, countries_name FROM TABLE_COUNTRIES ORDER BY countries_name; SELECT IF(countries_id='US', 0, 1) as ctsort, countries_id, countries_name FROM TABLE_COUNTRIES ORDER BY ctsort, countries_name Regards, -- Don Read [EMAIL PROTECTED] -- It's

Re: Dumping data

2003-06-25 Thread Don Read
--- Regards -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List

Re: Odd characters in my database

2003-06-25 Thread Don Read
when executing the SQL query it thinks they are the same. Any suggestions would be helpful. SELECT * FROM tablename WHERE fieldname LIKE CONCAT('%', CHAR(0x??), '%'); UPDATE tablename SET fieldname=REPLACE(fieldname, CHAR(0x??), ' '); Regards, -- Don Read

Re: Multi-table count

2003-06-25 Thread Don Read
. If you're pre 4.0 then: SET @cnt:=SELECT COUNT(*) FROM orders WHERE member_id='2'; SELECT @cnt + COUNT(*) AS totcnt FROM old_orders WHERE member_id='2'; Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal

Re: Simple Question: MySQL and Shell Scripts

2003-06-24 Thread Don Read
so that you don't pass the password on the command line. ~/.my.cnf Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

Re: Archiving tables ranges

2003-06-23 Thread Don Read
--where=date_time $INPERIOD db tbl tbl.dmp \ mysql -e DELETE FROM tbl WHERE date_time $INPERIOD db Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

RE: Complex SQL involving 10 checkboxes

2003-06-20 Thread Don Read
NAME=ageselect[] value=15 CHECKED input TYPE=CHECKBOX NAME=ageselect[] value=20 CHECKED input TYPE=CHECKBOX NAME=ageselect[] value=25 ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal

Re: search and replace.

2003-06-20 Thread Don Read
. I know how do use the regexp for SEARCHING, but can I do a replace on the same cmd with an UPDATE? UPDATE foo SET url=REPLACE(url, 'disciplines/', 'programs/') WHERE url LIKE 'disciplines/%'; Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest

Re: Odd thing

2003-06-19 Thread Don Read
$DUMP mkdir -p $DIR rm -f Today ln -sf $DIR Today cd $DIR for K in $DBS do TBLS=`mysql -N -e show tables $K` for I in $TBLS do mysqldump -e -q --add-drop-table $K $I $K.$I.sql rm -rf $K.$I.sql.gz gzip $K.$I.sql done done Regards, -- Don Read

Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Don Read
( idinv int unsigned not null, // invoice number line tinyint unsigned auto_increment,// line number idprod, qty, uom, price, cogs, // product shipped ... primary key(idinv, line) ) Regards, -- Don Read [EMAIL PROTECTED] -- It's

Re: transactions with php

2003-06-18 Thread Don Read
) { ... so either would be the correct construct here. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t

Re: Database Design Question...

2003-06-18 Thread Don Read
it into your table. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL

Re: probably a stupid question

2003-06-18 Thread Don Read
that into B. But are there better way's of doing something like this ? INSERT INTO tbl_B (A_id, ...) VALUES (LAST_INSERT_ID(), ...) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal

Re: @@identity

2003-06-18 Thread Don Read
. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List

Re: format a scientific number

2003-06-17 Thread Don Read
| +-+ 1 row in set (0.00 sec) mysql SELECT CONCAT(LEFT(@v, 4), 'e', SUBSTRING_INDEX(@v, 'e', -1)) as v; +--+ | v| +--+ | 1.35e-28 | +--+ 1 row in set (0.00 sec) Regards, -- Don Read [EMAIL PROTECTED] -- It's always

Re: mysql fails at strat

2003-06-16 Thread Don Read
16:36:37 Aborting Did you run mysql_install_db after installation? Directories in /etc/my.cnf (or command line opts) correct? Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's

Re: MySQL and running a function similar to PATINDEX()

2003-06-16 Thread Don Read
) + 1, LEN ( name )), fname = SUBSTRING ( author, PATINDEX ( '% %', name )); author =TRIM(author), fname=SUBSTRING_INDEX(author, ' ', 1), lname=SUBSTRING_INDEX(author, ' ', -1) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So

Re: DATE

2003-06-15 Thread Don Read
dap_cell SET my_new_date= REPLACE(CONCAT(RIGHT(my_date, 4), LEFT(my_date,5)), '/',''); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

Re: CAUTION! ALERT! WARNING! Newbie on board :)

2003-06-08 Thread Don Read
source to see if the query is what you think it is. snip Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t

Re: mysql query output get wrapped

2003-06-05 Thread Don Read
| ++-+---++++--- +---+-+ *unwrapped* xterm +aw Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql

RE: Displaying numbers with results - any ideas?

2003-06-04 Thread Don Read
, like PHP, PERL, VBScript, etc. You can also do the counting there when outputting each row from the query results. Or HTML : Ordered (i.e. numbered) lists take the form: OL LI ... first list item LI ... second list item ... /OL Regards, -- Don Read

RE: Advice on improving our current method

2003-06-02 Thread Don Read
need to keep using mysqlcc because it is very simple to use, but it is very time consuming. Any suggestions? SET @rank:=5; UPDATE music SET chart=0 WHERE [EMAIL PROTECTED]; UPDATE music SET chart=chart+1 WHERE chart@rank; Regards, -- Don Read [EMAIL

Re: group by

2003-05-27 Thread Don Read
the lack of the age_range number 2: 15-29). SELECT ELT(1+ (age/15), '0-14', '15-29', '30-44', '45-59') AS age_range Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's

RE: Query formulation question

2003-04-05 Thread Don Read
/MySQLWiz/page1.html; Cross-tabulationA Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

RE: help deciding on data types

2003-04-05 Thread Don Read
and then use COUNT(*) ... GROUP BY to get your totals. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql

RE: Mixed LEFT and INNER JOINs Report

2003-04-05 Thread Don Read
| +++ | billboard | 0 | | classified | 2 | | newspaper | 1 | | radio | 0 | +++ 4 rows in set (0.02 sec) (BTW, I think your field names are horrid ...) Regards, -- Don Read

RE: Selected items delete

2003-04-02 Thread Don Read
? Something along delete * in 'table' where num=1 and num=13 and num=34 etc. Thanks a lot. Pag DELETE FROM tbl WHERE num IN (4,78,34,23) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going

RE: Error 28

2003-04-01 Thread Don Read
: No space left on device localhost.dread$ Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

RE: Can't create thread error

2003-03-31 Thread Don Read
had some buggy pconnect problems. Last resort: Don't use pconnect unless you really --and I mean *really* need it. mysql_connect() is fast enough for just about everything. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So

RE: Can't create thread error

2003-03-31 Thread Don Read
%'; (stabbing wildly in the dark.) -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General

RE: mysql_fetch_row wrong on mysql 3.23.52

2003-03-30 Thread Don Read
you very much in advance. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

RE: get table name from select staement as output as field

2003-03-29 Thread Don Read
On 30-Mar-2003 Daniel Rossi wrote: hi guys is this possible ? select tablename1 as table1, id from tablename1 , tablename2 ? select 'tablename1' as table1, id from ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So

RE: weekly timestamp query

2003-03-28 Thread Don Read
) . WEEK() Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing

RE: AW: AW: multiple mysqld-max running ?

2003-03-28 Thread Don Read
/libexec/mysqld --basedi 2889 ?? IN 0:02.03 /usr/local/libexec/mysqld --basedi 133 con- I+ 0:00.02 /bin/sh /usr/local/bin/safe_mysqld localhost.dread$ Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going

RE: sum() using group, and duplicates problems...

2003-03-27 Thread Don Read
, pcfvar, hour); --- Kelly. You owe me two virtual beers. Shiner Bock or Miller High-Life tall-boys will be fine. Invoice to follow. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's

RE: Fw: Help, Insert not working.

2003-03-27 Thread Don Read
pissing around for an oversight. TIA mysql_query (INSERT INTO userdata (email, passwd, firstname, alias) VALUES ('$entered_email','$entered_passwd','$name','Hello')); or die('PDatabase error :', mysql_errno(), mysql_error(), 'BR'); Regards, -- Don Read

RE: Mirroring a table

2003-03-27 Thread Don Read
? - Ville Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List

RE: Choosing a column for primary key

2003-03-27 Thread Don Read
or more inserts. HTH. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL

RE: Formatting timestamp in MySQL outfile

2003-03-26 Thread Don Read
be greatly appreciated. Thanks in advance anirudh DATE_FORMAT(ts, '%Y-%m-%d %T') Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

RE: sum() using group, and duplicates problems...

2003-03-26 Thread Don Read
entries, the sum(val) will total both rows in the group --probably not what you want. A Perl script could help clear up any duplicates. Then you could add a UNIQUE key to keep 'em out. my $0.02. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest

RE: Data entered in PHP not appearing in mySQL

2003-03-26 Thread Don Read
in my crystal ball but the Magic eight-ball sez: 'declare your globals.' Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

RE: Query not returning what I expect....

2003-03-26 Thread Don Read
, (sORI + ':' + sDamionCode) as sCode FROM tblORI Any hints would be appreciated. MySQL uses CONCAT(sORI, ':', sDamionCode) AS sCode ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal

RE: Data entered in PHP not appearing in mySQL

2003-03-26 Thread Don Read
, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List For list archives

RE: sum() using group, and duplicates problems...

2003-03-25 Thread Don Read
where release = curdate()-1; Query OK, 2438 rows affected (0.11 sec) Records: 2438 Duplicates: 0 Warnings: 0 mysql Any ideas on how I can get rid of the bug wars??? Again. How about some examples? Regards, -- Don Read [EMAIL PROTECTED

RE: sum() using group, and duplicates problems...

2003-03-25 Thread Don Read
be working with DECIMAL(). Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL

RE: mysqldump

2003-03-24 Thread Don Read
) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List

RE: mysqlimport: Error: Can't get stat of

2003-03-24 Thread Don Read
On 24-Mar-2003 James E Hicks III wrote: snipage mysqlimport: Error: Can't get stat of '/fullpathto/thefile.SQL' (Errcode: 13), when using table: thefile localhost.dread$ perror 13 Error code 13: Permission denied localhost.dread$ -- Don Read

RE: maintaining delivery order in a table

2003-03-24 Thread Don Read
| ++---+--+ mysql select id,name, (@nc:=ncust) as next from b where [EMAIL PROTECTED] LIMIT 1; Empty set (0.00 sec) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's

RE: date problem

2003-03-23 Thread Don Read
wishes, Strahil Minev a.k.a. DLHelper, BuFu TeaM mailto:[EMAIL PROTECTED] Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

RE: IN and comma delimitered id's

2003-03-23 Thread Don Read
') | +---+ | 0 | +---+ Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

RE: A query problem...

2003-03-20 Thread Don Read
` AND depo.`Iptal` = 0 AND urun.`HizmetUrunu` = 0 GROUP BY urun.`ID` But i dont want to get a row which `Mevcut Miktar`=0 How i can modify my query. HAVING `Mevcut Miktar` 0 Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn

Re: INTO LOCAL OUTFILE?

2003-03-16 Thread Don Read
to eliminate that? If not, that is just fine. mysql -N -e select * from tbl_name db_name output Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time

Re: Updat not Updating

2003-03-15 Thread Don Read
$querystring\n\n); mysql_query($querystring); will output.. select * from mytable; You can check the syntax of the command this way. Yep. My code is littered with: // echo $qry;exit; -- and -- echo !-- $qry --; Regards, -- Don Read [EMAIL

RE: Fw: Swapping around values in a database

2003-03-15 Thread Don Read
); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

RE: 13: Can't get stat

2003-03-10 Thread Don Read
denied Error code 2: No such file or directory localhost.dread$ Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

RE: Best way to dump for daily archiving

2003-03-01 Thread Don Read
` for I in $TBLS do mysqldump -e -q --add-drop-table $K $I $K.$I.dmp rm -rf $K.$I.dmp.gz gzip $K.$I.dmp done done --- This gives a 7 day rotation, Mon-Sun. With the latest dump in the 'Today' directory. Regards, -- Don Read

RE: Deleting records while parsing query results (in Perl DBI)?

2003-03-01 Thread Don Read
); } Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

RE: Very basic If statement problem

2003-03-01 Thread Don Read
); $message1='Digitized for ' .$vals[$k]; Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

RE: Days in a month

2003-03-01 Thread Don Read
) - TO_DAYS(@b) as FebDays; +-+ | FebDays | +-+ | 28 | +-+ 1 row in set (0.00 sec) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time

Re: SELECT DISTINCT question

2003-02-27 Thread Don Read
the SELECT statement? You'll probably need an 'ORDER BY' somewhere in there. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

RE: Help needed with SQL...

2003-02-26 Thread Don Read
montoya | [EMAIL PROTECTED] | ++---+-+ 3 rows in set (0.01 sec) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time

RE: Help needed with SQL...

2003-02-26 Thread Don Read
obvious if I'd put the 'a.memberid=1' clause first. Sorry ...) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do

RE: Table Update

2003-02-26 Thread Don Read
: mysql_connect($DBHost,$DBUser,$DBPass) or die(Could not connect: . mysql_error()); $qry=UPDATE items SET ItemSKU='$ItemSKU', ...sniptherest; echo 'P', $qry, 'P'; $res = mysql_query($qry) or die(Invalid query: . mysql_error()); Cheers Andrew Regards, -- Don Read

RE: select help

2003-02-26 Thread Don Read
for 'LEFT JOIN' in the manual. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query

RE: sql select from question

2003-02-24 Thread Don Read
of. Depending on the application language it might be easier to post-process: $result = mysql_query('SELECT * FROM mytable'); while ($row = mysql_fetch_array($result, MYSQL_NUM)) { unset($row[34]); echo 'The values :', implode(', ', $row), 'br'; } Regards, -- Don Read

  1   2   3   >