Undeleting an entire Database?

2006-04-25 Thread clint lenard
Hey guys,

 Well, I was unable to find anything on Google and I don't expect to find a
miracle... but I figured why not.

On Sunday morning I was trying to delete a Table through PHPMyAdmin and
well... I dropped the entire DB without backing it up before. Stupid
mistake, I know.

So, I'm using Fedora Core OS/Linux and I was wondering if there was any way
to undelete this db? I lost about 350 new members on my site + all kinds of
blogs, comments, messages, etc. Is there ANY way to get this info back? If
not, It's not a huge deal... I suppose. I just wanted to see if anyone might
know of any special ways to get some of the data back.

Thanks!

- Clint Lenard


Need help with a Basic Query.

2006-03-08 Thread clint lenard
Hey Guys,

  I was wondering if I could get some assistance with building a
Simple Import Script using PHP and MySQL. Basically I'm trying to pull
info out of one Table and Insert it into the other Table.

Can anyone show me a simple example of this? I can figure out how to
do the rest if I had a simple example.

Thanks!

- Clint

--
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 clint lenard
Interesting

On 10/7/05, Hassan Schroeder [EMAIL PROTECTED] wrote:
 FYI, from the Silicon Valley Business Journal:


 Oracle buys Finnish open source company

 Oracle Corp. said Friday it has bought Innobase OY, a software company
 based in Finland, for an undisclosed price.

 Innobase makes open source database software. Its product, InnoDB, runs
 on the MySQL database system, also an open source software system.
 Oracle said it has long supported open source software, which is freely
 available to anyone who wants to build on it or improve it, and said it
 plans to add more to open source systems in the future.

 Redwood Shores-based Oracle (NASDAQ: ORCL) said it plans to negotiate to
 extend the deal between Innobase and MySQL when it needs to be renewed
 next year.

 http://www.bizjournals.com/sanjose/stories/2005/10/03/daily52.html?hbx=e_du

 --
 Hassan Schroeder - [EMAIL PROTECTED]
 Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

   dream.  code.



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



--
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-12 Thread clint lenard
Hey Douglass,

Curious about using Smarty (taking the Crash Course and bookmarked a couple 
of other tut's)... One of the advantages of using a DB to store the HTML 
Sites was the opportunity to give the user an automated Zip file of their 
site if they wanted to download it and create their own site (domain) with 
it at any time... can this be done with Smarty? Like I said - I've used 
Smarty before - but only through a program called Jamroom - and it's 
basically using their Variables for their program - and it was limited.

So, my main concern is - if the User wanted to download their site and have 
their own copy to upload to another domain - would it be possible to do 
this? Sorry, my mind is tired along with my eyes... I guess I'm still not 
100% sure how Smarty works!

Thanks,

Clint

On 9/12/05, clint lenard [EMAIL PROTECTED] wrote:
 
 Douglass, thanks for the tips!
 
 As far as Mambo or Xoops - I wanted to create something a little different 
 - but I WAS thinking of using Smarty before-hand... I just wasn't sure how I 
 could really use it? I'm familiar with Smarty as far as I've played around 
 with it a little... but I guess I wasn't sure how I could use it in this 
 situation... are you saying that I should have Smarty hold the design - and 
 use MySQL to populate the Virtual Sites with the Content stored in the DB? 
 
 
 It sounds like a great Idea and would probably be much more Resource 
 friendly! This is why I asked for more info and gave more info - hoping NOT 
 to get someone to code anything - but to give me Ideas on what would work 
 the best. :)
 
 Thanks alot for the info Douglass! I'm going to search the web for more 
 Tutorials on Smarty - hopefully I find something related to this! It'd 
 probably make my life much easier if what I think you're saying is what 
 you're actually saying lol
 
 On 9/12/05, [EMAIL PROTECTED]  [EMAIL PROTECTED] 
 wrote:
  
  clint lenard wrote:
  
  Hi guys, I'm fairly new to MySQL and I've searched for about a week looking 
  for an answer to this...
  
  I'm trying to design a Database that would hold HTML sites in the DB itself 
  and use PHP to call for the HTML file - which would be populated with 
  Content from another table in MySQL. I was told I could put HTML into 
  MySQL... so my main question would be: is this possible?, is this a BAD 
  thing? but most of all... would this be resource intensive?
  
  Thanks for any answers! I hope I'm using this list correctly - I did search 
  Google and I've been reading an MySQL Manual for over a week now trying to 
  get it down 110%!
  
  Thanks,
  
  Clint
  
 
  If you would like, you may check out these related technologies that do 
  what you are talking about already:
  
  www.mamboserver.com http://www.mamboserver.com
  www.xoops.com http://www.xoops.com
  
  Also, if you use templates, it makes it easy to just keep the relevant 
  parts of the page, and then display them inside of a predefined template. 
  That way, you can change the template whenever you want, and all your pages 
  will change. If you store the part of the HTML that formats the text 
  (color, 
  style etc) in the DB, this isn't possible.
  
  smarty.php.net http://smarty.php.net
  
  wasn't sure if you could use any of these, but, here's the info. 
  
  -- 
  http://www.douglassdavis.com
  
  



Re: HTML in MySQL?

2005-09-12 Thread clint lenard
can anyone help me with this question?

On 9/12/05, clint lenard [EMAIL PROTECTED] wrote:
 
 Hey Douglass,
 
 Curious about using Smarty (taking the Crash Course and bookmarked a 
 couple of other tut's)... One of the advantages of using a DB to store the 
 HTML Sites was the opportunity to give the user an automated Zip file of 
 their site if they wanted to download it and create their own site (domain) 
 with it at any time... can this be done with Smarty? Like I said - I've used 
 Smarty before - but only through a program called Jamroom - and it's 
 basically using their Variables for their program - and it was limited.
 
 So, my main concern is - if the User wanted to download their site and 
 have their own copy to upload to another domain - would it be possible to do 
 this? Sorry, my mind is tired along with my eyes... I guess I'm still not 
 100% sure how Smarty works!
 
 Thanks,
 
 Clint
 
 On 9/12/05, clint lenard [EMAIL PROTECTED] wrote:
  
  Douglass, thanks for the tips!
  
  As far as Mambo or Xoops - I wanted to create something a little 
  different - but I WAS thinking of using Smarty before-hand... I just wasn't 
  sure how I could really use it? I'm familiar with Smarty as far as I've 
  played around with it a little... but I guess I wasn't sure how I could use 
  it in this situation... are you saying that I should have Smarty hold the 
  design - and use MySQL to populate the Virtual Sites with the Content 
  stored in the DB? 
  
  It sounds like a great Idea and would probably be much more Resource 
  friendly! This is why I asked for more info and gave more info - hoping NOT 
  to get someone to code anything - but to give me Ideas on what would work 
  the best. :)
  
  Thanks alot for the info Douglass! I'm going to search the web for more 
  Tutorials on Smarty - hopefully I find something related to this! It'd 
  probably make my life much easier if what I think you're saying is what 
  you're actually saying lol
  
  On 9/12/05, [EMAIL PROTECTED]  [EMAIL PROTECTED] 
  wrote:
   
   clint lenard wrote:
   
   Hi guys, I'm fairly new to MySQL and I've searched for about a week 
   looking 
   for an answer to this...
   
   I'm trying to design a Database that would hold HTML sites in the DB 
   itself 
   and use PHP to call for the HTML file - which would be populated with 
   
   Content from another table in MySQL. I was told I could put HTML into 
   MySQL... so my main question would be: is this possible?, is this a 
   BAD 
   thing? but most of all... would this be resource intensive?
   
   
   Thanks for any answers! I hope I'm using this list correctly - I did 
   search 
   Google and I've been reading an MySQL Manual for over a week now trying 
   to 
   get it down 110%!
   
   Thanks,
   
   Clint
   
   
 

   If you would like, you may check out these related technologies that 
   do what you are talking about already:
   
   www.mamboserver.com http://www.mamboserver.com
   www.xoops.com http://www.xoops.com
   
   Also, if you use templates, it makes it easy to just keep the relevant 
   parts of the page, and then display them inside of a predefined template. 
   That way, you can change the template whenever you want, and all your 
   pages 
   will change. If you store the part of the HTML that formats the text 
   (color, 
   style etc) in the DB, this isn't possible.
   
   smarty.php.net http://smarty.php.net
   
   wasn't sure if you could use any of these, but, here's the info. 
   
   -- 
   http://www.douglassdavis.com
   
   
  



Re: HTML in MySQL?

2005-09-11 Thread clint lenard
Wow, thanks for all of the Information guys! I've learned alot and now I've 
actually been doing more brain storming... I've been reading all of these 
emails over and over - and they're helping me understand more!

What I'm trying to do is save User Sites in MySQL and use PHP to pull them 
out through the Database using a Virtual Directory (if that's what it could 
be called?) like: http://mysite,com/bob-in-germany or just 
http://mysite,com/bobingermany/

There may be a ton of these sites as time moves on and I'm just trying to 
make sure I learn as much as I can before I get a major problem on my 
hands... I know it may be resource intensive - but it just seems to be 
easier to delete unused sites through a DB rather than a File System I may 
not have full control over?

Anyways, Thanks again guys! This is helping alot! anymore feedback would be 
great!

- Clint

P.S. - Sorry Jasper for sending it to you and not the list... I'm new to 
GMail :(

On 9/11/05, Jasper Bryant-Greene [EMAIL PROTECTED] wrote:
 
 Jasper Bryant-Greene wrote:
  John Trammell wrote:
 
  $input = This is br the \n input; # value from user
  $saved = This is br the br input; # value in database
  $recovered = This is \n the \n input; # retrieved from db, != $input
 
 
  Please don't top-post. That is the perfect argument for not applying
  nl2br() before saving the information in the database. It should be done
  *when outputting* instead.
 
  ?php
  $in = mysql_real_escape_string(This is br the \n input);
  mysql_query(INSERT INTO my_table (my_field) VALUES ('$in'));
 
  $array =mysql_fetch_assoc(mysql_query(SELECT my_field FROM my_table));
  print(nl2br($array['my_field']));
  ?
 
  works exactly as intended.
 
 
 Oh, and I should mention you probably want to htmlspecialchars() that
 data too, if you actually want to see the br and if you want to
 protect from XSS attacks etc.
 
 --
 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-11 Thread clint lenard
Douglass, thanks for the tips!

As far as Mambo or Xoops - I wanted to create something a little different - 
but I WAS thinking of using Smarty before-hand... I just wasn't sure how I 
could really use it? I'm familiar with Smarty as far as I've played around 
with it a little... but I guess I wasn't sure how I could use it in this 
situation... are you saying that I should have Smarty hold the design - and 
use MySQL to populate the Virtual Sites with the Content stored in the DB? 


It sounds like a great Idea and would probably be much more Resource 
friendly! This is why I asked for more info and gave more info - hoping NOT 
to get someone to code anything - but to give me Ideas on what would work 
the best. :)

Thanks alot for the info Douglass! I'm going to search the web for more 
Tutorials on Smarty - hopefully I find something related to this! It'd 
probably make my life much easier if what I think you're saying is what 
you're actually saying lol

On 9/12/05, [EMAIL PROTECTED] [EMAIL PROTECTED] 
wrote:
 
 clint lenard wrote:
 
 Hi guys, I'm fairly new to MySQL and I've searched for about a week looking 
 for an answer to this...
 
 I'm trying to design a Database that would hold HTML sites in the DB itself 
 and use PHP to call for the HTML file - which would be populated with 
 Content from another table in MySQL. I was told I could put HTML into 
 MySQL... so my main question would be: is this possible?, is this a BAD 
 thing? but most of all... would this be resource intensive?
 
 Thanks for any answers! I hope I'm using this list correctly - I did search 
 Google and I've been reading an MySQL Manual for over a week now trying to 
 get it down 110%!
 
 Thanks,
 
 Clint
 

 If you would like, you may check out these related technologies that do 
 what you are talking about already:
 
 www.mamboserver.com http://www.mamboserver.com
 www.xoops.com http://www.xoops.com
 
 Also, if you use templates, it makes it easy to just keep the relevant 
 parts of the page, and then display them inside of a predefined template. 
 That way, you can change the template whenever you want, and all your pages 
 will change. If you store the part of the HTML that formats the text (color, 
 style etc) in the DB, this isn't possible.
 
 smarty.php.net http://smarty.php.net
 
 wasn't sure if you could use any of these, but, here's the info. 
 
 -- 
 http://www.douglassdavis.com
 



HTML in MySQL?

2005-09-09 Thread clint lenard
Hi guys, I'm fairly new to MySQL and I've searched for about a week looking 
for an answer to this...

I'm trying to design a Database that would hold HTML sites in the DB itself 
and use PHP to call for the HTML file - which would be populated with 
Content from another table in MySQL. I was told I could put HTML into 
MySQL... so my main question would be: is this possible?, is this a BAD 
thing? but most of all... would this be resource intensive?

Thanks for any answers! I hope I'm using this list correctly - I did search 
Google and I've been reading an MySQL Manual for over a week now trying to 
get it down 110%!

Thanks,

Clint


Re: HTML in MySQL?

2005-09-09 Thread clint lenard
Thanks Jasper for the info! This may sound stupid - but I just want to be 
sure... do I need to strip the slashes and special characters out and add 
them when they're called... or..? I'm just trying to get a clear picture 
of exactly what needs to be done with this particular job...

thanks!

On 9/9/05, Jasper Bryant-Greene [EMAIL PROTECTED] wrote:
 
 clint lenard wrote:
  Hi guys, I'm fairly new to MySQL and I've searched for about a week 
 looking
  for an answer to this...
 
  I'm trying to design a Database that would hold HTML sites in the DB 
 itself
  and use PHP to call for the HTML file - which would be populated with
  Content from another table in MySQL. I was told I could put HTML into
  MySQL... so my main question would be: is this possible?, is this a 
 BAD
  thing? but most of all... would this be resource intensive?
 
 Of course -- HTML is just a string like any other. Just use a TEXT field
 of the 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 poor
 student! You can choose whatever amount you think my advice was
 worth to you. http://tinyurl.com/7oa5s
 
 --
 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-09 Thread clint lenard
David and Jasper - thank you both! I will play around with this more now 
that you have explained my biggest questions!

Thanks guys,

Clint

:-)

On 9/9/05, Jasper Bryant-Greene [EMAIL PROTECTED] wrote:
 
 clint lenard wrote:
  Thanks Jasper for the info! This may sound stupid - but I just want to
  be sure... do I need to strip the slashes and special characters out and
  add them when they're called... or..? I'm just trying to get a clear
  picture of exactly what needs to be done with this particular job...
 
 If you're using PHP, you need to run mysql_real_escape_string() on any
 string data that is going into MySQL. This will handle escaping and
 special characters for you, and there is no need to unescape it when
 retrieving it from the DB.
 
 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 General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
 



RE: show temporary table

2005-01-23 Thread Clint Edwards
Sam,
You can use 'show tables' with a like clause if you prefix your temporary 
tables with a string such as 'tmp_'.  See the manual for syntax:

http://dev.mysql.com/doc/mysql/en/show-tables.html
Clint
From: sam wun [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: show temporary table
Date: Sun, 23 Jan 2005 15:47:22 +0800
Hi,
How can I see all temporary tables that created by Create Temporary Table 
command in mysql 5.01?

thanks
Sam
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: create indexes for temporary table

2005-01-23 Thread Clint Edwards
Sam,
Remove the double quotes and semi-colon out of this statement:
$tmp_sql = qq{alter table tmp_pastsales add 
index(salescode,basename,prodcode)};

Clint
From: sam wun [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: create indexes for temporary table
Date: Sun, 23 Jan 2005 18:49:51 +0800
Hi,
I want to create indexes for temporary created tables in perl dbi.
The following is perl code that I tried, but perl dbi seems not allow the 
syntax:

Unable to execute our query PastSales:You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the 
right syntax to use near 'alter table tmp_pastsales add 
index(salescode,basename,prodcode);' at line 1 Unable to execute our query 
Sales:You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the right syntax to use near 
'alter table tmp_sales add index(salescode,basename,prodcode);' at line 1

This is the actual perl code I use:
$tmp_sql = qq{alter table tmp_pastsales add 
index(salescode,basename,prodcode);};
$sth_tmp = $dbh-prepare($tmp_sql) or print Unable to prep our 
query:.$dbh-errstr.\n;
$sth_tmp-execute or print Unable to execute our query 
PastSales:.$dbh-errstr.\n;

Thanks
Sam
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: getting error with mysql_fix_privilege_tables

2005-01-19 Thread Clint Edwards
Steve,
Below is output from the mysql_fix_privilege_tables script:
You can safely ignore all 'Duplicate column' and 'Unknown column' errors 
because these just mean that your tables are already up to date.

I would not worry about the Duplicate Key error, because that is likely 
the same case as Duplicate column.

Clint
From: scohen [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: getting error with mysql_fix_privilege_tables
Date: Tue, 18 Jan 2005 17:40:24 -0500 (EST)
When I run mysql_fix_privilege_tables it tells me to ignore a lot of
errors. But it doesn't tell me about this error:
ERROR 1061 at line 5: Duplicate key name 'Grantor'
Can I ignore this? What is it from?
Thanks,
Steve
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: sub query is extermely slow

2005-01-19 Thread Clint Edwards
Sam,
Can you send the output of the following:
#explain your query\G
Clint
From: sam wun [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: sub query is extermely slow
Date: Wed, 19 Jan 2005 20:02:37 +0800
Hi list,
The following sql statement takes 3 mintues to complete the query. How can 
I improve its speed?
select DISTINCT i.basename from inventory i, transaction t, customer c 
where i.prodcode = t.prodcode and c.custcode = t.custcode and i.basename is 
not NULL and i.prodname is not NULL and ((date(t.date) = 2004-01-01 and 
date(t.date) = 2004-01-31) and i.basename IN (select DISTINCT 
ii.basename from inventory ii, transaction tt, customer cc where 
ii.prodcode = tt.prodcode and cc.custcode = tt.custcode and ii.basename is 
not NULL and ii.prodname is not NULL and(date(tt.date) = 2005-01-01 and 
date(tt.date) = 2005-01-31))) order by i.basename

Thanks
Sam
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: sub query is extermely slow

2005-01-19 Thread Clint Edwards
Sam,
Can you send the following information:
When was the last time 'analyze table table_name' (inventory, transaction, 
customer) was executed?

OS:
MySQL Version:
Available Ram:
Output from 'SHOW CREATE TABLE table_name' (inventory, transaction, and 
customer):

Output from SHOW VARIABLES LIKE '%buffer%';:
Clint
From: sam wun [EMAIL PROTECTED]
To: Clint Edwards [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: sub query is extermely slow
Date: Wed, 19 Jan 2005 20:39:41 +0800
Clint Edwards wrote:
Sam,
Can you send the output of the following:
#explain your query\G
Thanks for the suggestion, here is the output of the explain query:
mysql explain select DISTINCT i.basename from inventory i, transaction t, 
customer c where i.prodcode = t.prodcode and c.custcode = t.custcode and 
i.basename is not NULL and i.prodname is not NULL and ((date(t.date) = 
2004-01-01 and date(t.date) = 2004-01-31) and i.basename IN (select 
DISTINCT ii.basename from inventory ii, transaction tt, customer cc where 
ii.prodcode = tt.prodcode and cc.custcode = tt.custcode and ii.basename is 
not NULL and ii.prodname is not NULL and(date(tt.date) = 2005-01-01 and 
date(tt.date) = 2005-01-31))) order by i.basename;
+++---++---+--+-+--+--+--+
| id | select_type| table | type   | possible_keys | key  | 
key_len | ref  | rows | Extra   
 |
+++---++---+--+-+--+--+--+
|  1 | PRIMARY| c | index  | PRIMARY   | PRIMARY  | 
32  | NULL |  317 | Using index; Using temporary; Using 
filesort |
|  1 | PRIMARY| t | ref| custcode,prodcode | custcode | 
32  | datacube.c.custcode  |   36 | Using where 
 |
|  1 | PRIMARY| i | eq_ref | PRIMARY   | PRIMARY  | 
32  | datacube.t.prodcode  |1 | Using where 
 |
|  2 | DEPENDENT SUBQUERY | cc| index  | PRIMARY   | PRIMARY  | 
32  | NULL |  317 | Using index; Using temporary
 |
|  2 | DEPENDENT SUBQUERY | tt| ref| custcode,prodcode | custcode | 
32  | datacube.cc.custcode |   36 | Using where 
 |
|  2 | DEPENDENT SUBQUERY | ii| eq_ref | PRIMARY   | PRIMARY  | 
32  | datacube.tt.prodcode |1 | Using where 
 |
+++---++---+--+-+--+--+--+
6 rows in set (0.01 sec)

Clint
From: sam wun [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: sub query is extermely slow
Date: Wed, 19 Jan 2005 20:02:37 +0800
Hi list,
The following sql statement takes 3 mintues to complete the query. How 
can I improve its speed?
select DISTINCT i.basename from inventory i, transaction t, customer c 
where i.prodcode = t.prodcode and c.custcode = t.custcode and i.basename 
is not NULL and i.prodname is not NULL and ((date(t.date) = 2004-01-01 
and date(t.date) = 2004-01-31) and i.basename IN (select DISTINCT 
ii.basename from inventory ii, transaction tt, customer cc where 
ii.prodcode = tt.prodcode and cc.custcode = tt.custcode and ii.basename 
is not NULL and ii.prodname is not NULL and(date(tt.date) = 2005-01-01 
and date(tt.date) = 2005-01-31))) order by i.basename

Thanks
Sam

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: sub query is extermely slow

2005-01-19 Thread Clint Edwards
Sam,
Can you create an index on transaction.date, then run your query again?  If 
that is not better send me the output of 'explain query' again.

This index may not be a good idea, depending on how many transaction are in 
the table on a specified date.

Clint
From: sam wun [EMAIL PROTECTED]
To: Clint Edwards [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: sub query is extermely slow
Date: Wed, 19 Jan 2005 22:05:58 +0800
Clint Edwards wrote:
Sam,
Can you send the following information:
When was the last time 'analyze table table_name' (inventory, 
transaction, customer) was executed?

Hi, here is the result of the analyze command:
mysql analyze table inventory,transaction, customer;
+--+-+--+--+
| Table| Op  | Msg_type | Msg_text |
+--+-+--+--+
| datacube.inventory   | analyze | status   | OK   |
| datacube.transaction | analyze | status   | OK   |
| datacube.customer| analyze | status   | OK   |
+--+-+--+--+
3 rows in set (0.83 sec)
OS:
MySQL Version:
Mysql 5.0
Available Ram:
254RAM
Output from 'SHOW CREATE TABLE table_name' (inventory, transaction, and 
customer):

Output from SHOW VARIABLES LIKE '%buffer%';:
mysql SHOW CREATE TABLE inventory;
+---+---+
| Table | Create Table  
   
   
   
   
|
+---+---+
| inventory | CREATE TABLE `inventory` (
 `prodcode` varchar(32) NOT NULL default '',
 `qty` decimal(9,2) NOT NULL default '0.00',
 `lastupdatedate` date NOT NULL default '-00-00',
 `prodname` varchar(32) default 'UNKNOWN',
 `basename` varchar(32) default 'UNKNOWN',
 `vendorname` varchar(50) default 'UNKNOWN',
 `cost` decimal(9,2) NOT NULL default '0.00',
 PRIMARY KEY  (`prodcode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+---+---+
1 row in set (0.39 sec)

mysql SHOW CREATE TABLE transaction;
+-++
| Table   | Create Table

Re: mysql.sock file exists, but still cannot connect to server

2005-01-19 Thread Clint Edwards
The postmaster is a Postgres daemon, and pg_shadow is the user table for 
postgres.

Clint
From: Michael Stassen [EMAIL PROTECTED]
To: Alex Majora [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: mysql.sock file exists, but still cannot connect to server
Date: Wed, 19 Jan 2005 17:42:34 -0500
Alex Majora wrote:
I've upgraded to mysql 4.1.9 on Mac OS X 10.3.7, but now things won't 
start up.
In the console I get these messages:

 The database cluster will be initialized with locale C.
 creating directory /var/db/RemoteManagement/RMDB/rmdb.data... ok
 creating directory /var/db/RemoteManagement/RMDB/rmdb.data/base... ok
 creating directory /var/db/RemoteManagement/RMDB/rmdb.data/global... ok
 creating directory /var/db/RemoteManagement/RMDB/rmdb.data/pg_xlog... ok
 creating directory /var/db/RemoteManagement/RMDB/rmdb.data/pg_clog... ok
 creating template1 database in 
/var/db/RemoteManagement/RMDB/rmdb.data/base/1... ok
 creating configuration files... ok
 initializing pg_shadow... ok
 enabling unlimited row size for system tables... ok
 initializing pg_depend... ok
 creating system views... ok
 loading pg_description... ok
 creating conversions... ok
 setting privileges on built-in objects... ok
 vacuuming database template1... ok
 copying template1 to template0... ok

 Success. You can now start the database server using:
What is this?  These messages do not appear to have come from mysql. 
There's something you haven't told us.  What is RemoteManagement/RMDB?  Is 
this something you run by hand, or something automated?

/System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/postmaster 
-D /var/db/RemoteManagement/RMDB/rmdb.data
 or
   /System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/pg_ctl 
-D /var/db/RemoteManagement/RMDB/rmdb.data -l logfile start

 LOG:  database system was shut down at 2005-01-19 12:36:29 PST
 LOG:  checkpoint record is at 0/71524
 LOG:  redo record is at 0/71524; undo record is at 0/0; shutdown TRUE
 LOG:  next transaction id: 1744; next oid: 16766
 LOG:  database system is ready
 ERROR:  To use passwords, you have to revoke permissions on pg_shadow so 
normal users cannot read the passwords. Try 'REVOKE ALL ON pg_shadow 
FROM PUBLIC'.
Have you tried doing what it says here?
MySQL seems to be running:
 649  ??  S  0:00.02 
/System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/postmaster 
-D /var/db/RemoteManagement/RMDB/rmdb.data
That doesn't appear to be mysql.
When I run MySQLManager, I get this error message:
 2005-01-19 12:37:34.328 MySQLInfoTool[667] Initial attempt at db 
installation failed, probably due to bad hostname; trying again with force 
option.
 ERROR: 1064  You have an error in your SQL syntax.  Check the manual 
that corresponds to your MySQL server version for the right syntax to use 
near 
'' 
at line 1
That certainly seems to be a message (syntax error) from mysql.
 050119 12:37:34  Aborting
 050119 12:37:34  /usr/libexec/mysqld: Shutdown Complete
Not sure why, but mysqld just shut down.
When I type mysql at the command line, I get:
 ERROR 2002: Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (2)
Are you sure mysqld is running?  You got a shutdown message right before 
this.

...yet the file exists:
 srwxrwxrwx   1 mysql   wheel0 19 Jan 12:35 mysql.sock
Well, that should mean mysqld is running.  Two things:
1) Use ps to make sure there's a mysqld process (ps -aux | grep mysqld).
2) Check the permissions on /tmp (actually, /private/tmp under OS X).  Some 
OS X updates have changed /tmp permissions in the past.

Any ideas about what to do? I've reinstalled the mySQL package, but it 
didn't change things.

Thanks!
Alex
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Rollback and INSERT_ID() or LAST_INSERT_ID()

2005-01-18 Thread Clint Edwards
Andre,
I would recommend a table for recovering id's that are lost due to rollback. 
 Before you actually rollback, take the generated ID and push it into this 
table.  Then change the way you acquire id's on insert.  You will want to 
check to see if this table has an ID before you auto_increment the table you 
are inserting the record into.  This should be a little less resource 
intensive than to put all data into temporary tables.

Clint
From: Joerg Bruehe [EMAIL PROTECTED]
To: mysql@lists.mysql.com
CC: Andre Matos [EMAIL PROTECTED], Paul DuBois [EMAIL PROTECTED]
Subject: Re: Rollback and INSERT_ID() or LAST_INSERT_ID()
Date: Tue, 18 Jan 2005 11:08:40 +0100
Hi!
Am Di, den 18.01.2005 schrieb Paul DuBois um 3:53:
 At 21:27 -0500 1/17/05, Andre Matos wrote:
 Thanks Eric, but I can let it increment because I cannot have a gave in 
the
 numbers. I think I will need to use MAX() in this case.

 Using MAX() won't guarantee that you won't have gaps.

 What you're describing cannot be achieved in the general case.
 Consider this scenario:

 - Transaction T1 begins, generates an AUTO_INCREMENT value n.
 - Transaction T2 begins, generates an AUTO_INCREMENT value n+1.
 - Transaction T2 commits.
 - Transaction T1 rolls back.

 You now have a gap at value n, and a used value of n+1.
 MAX() at this point returns n+1, not n, so that won't
 help you reuse n.

 With more than two transactions running simultaneously, each
 of which can roll back or commit, the situation becomes more
 complex.

IMO, Andre's only chance is to code his transactions in such a way that
they need not rollback (only do so if the whole system stops).
One way that comes to my mind is to accumulate all data in some
temporary table, using some other value as ID (or in application
variables), and only after the final yes, do it confirmation transfer
them to the true tables with the auto-increment ID.
In future releases, stored procedures might be another way to ensure all
actions are grouped without an intervening parallel rollback.
If your concurrency requirements are low and you can stand wait time,
you could keep the next ID in an application-controlled table, locked
from its retrieval to a final increment at transaction commit; but I
agree these low requirements are unusual.
As an alternative, a rollback might create a dummy record using that ID
which acts as a placeholder, maybe with a remark user rollback or
similar - if that is permissible in the application.

 Might be worth reconsidering whether you really require no
 gaps.  It's generally better to try to design an application
 not to have that dependency.
Paul, while I agree with that preference, I know that sometimes there is
no choice. As an example, some German bookkeeping regulation requires
you to use dense booking numbers (without gap). So I know of a software
project that used _descending_ numbers because they were faster to
generate in their environment than ascending ones. (This does not solve
the rollback issue, of course.)
Regards,
Joerg
--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com
Are you MySQL certified?  www.mysql.com/certification
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Sun Cobalt Web Server RTX

2003-07-17 Thread Clint S. Jones
What type of MySql can I install on a cobalt web server???  Please help... not sure...
 
 
 
Clint S. Jones
Computer Teks, Inc.
President
1520 East Sunrise Blvd.
Suite: 202
Fort Lauderdale, FL 33304
(954) 465-5516
(954) 767-6150 fax
[EMAIL PROTECTED]
 
www.webingenuity.net http://www.webingenuity.net/ 
www.computerteks.net http://www.computerteks.net/ 
 


Segmentation Fault when connecting via TCP/IP

2002-10-15 Thread clint

Description:
Recently the server had to be hard-booted... a safe shutdown was not possible. 
After the server came back up, mysql 
has been acting very funny. When the server first boots, mysql wont respond to 
anything. I restart mysql and all works fine 
when connecting to Localhost, however when you try to connect to the server via TCP/IP 
you get the following error on the 
client :

[root@monitor bin]# ./mysqlshow -h www.dis.net -u root -p
Enter password: 
./mysqlshow: Lost connection to MySQL server during query
[root@monitor bin]#

At the same you do this on the client machine.. you get this on the host machine :

/usr/local/bin/safe_mysqld: line 269: 26209 Segmentation fault  $NOHUP_NICENESS 
$ledir/$MYSQLD $defaults 
--basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file 
--skip-locking $err_log 21

Number of processes running now: 1
mysqld process hanging, pid 26212 - killed
021015 14:54:14  mysqld restarted

I originally thought it may have something to do with the client.. but even a simple 
'telnet www.host.com 3306' will produce 
the same error on the server.

I tried starting mysql directly (without using safe_mysqld) by using 
/usr/local/libexec/mysqld --user=root. When I did this, 
it 
didnt spit out an error on the client side, but it does cause a segmentation fault on 
the server with no additional warnings 
or logs. After that the server fails to respond to anything.

I have re-installed mysql from a secured distribution, so I know it doesnt have 
anything to do with any tampering. I have run 
checks on all of the databases and they all seem fine. Also, everything works fine 
when connecting with a UNIX socket 
(Localhost), the problem only appears when connecting with TCP/IP.

How-To-Repeat:
Connect to the server via TCP/IP
Fix:
No Clue.

Submitter-Id:  submitter ID
Originator:[EMAIL PROTECTED]
Organization: Digital Internet Services Corporation
MySQL support: none
Synopsis:  Server crashes on connect via TCP/IP.
Severity:  critical
Priority:  high
Category:  mysql
Class: sw-bug
Release:   mysql-3.23.41 (Source distribution)

Environment: 
System: Linux www.dis.net 2.4.9-31 #1 Tue Feb 26 07:11:02 EST 2002 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-85)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Oct  7 09:33 /lib/libc.so.6 - libc-2.2.4.so
-rwxr-xr-x1 root root  1285884 Sep  9 09:10 /lib/libc-2.2.4.so
-rw-r--r--1 root root 27336078 Sep  9 08:48 /usr/lib/libc.a
-rw-r--r--1 root root  178 Sep  9 08:48 /usr/lib/libc.so
Configure command: ./configure 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: [PHP-DB] any good web hosting with php and mysql support?

2002-01-14 Thread clint

Try www.aletiahosting.com  $9.95 a month

-- Original Message --
From: Gurhan Ozen [EMAIL PROTECTED]
Date: Mon, 14 Jan 2002 13:17:59 -0500

  Hi All,
 I am currently looking for a reliable web host to host my personal website.
I know there are millions of web hosting companies that have PHP and MYSQL
support but I just can't trust any of the fully-assured and confident
webhosting ads anymore. I would like to get a service from a company for
which someone can vouch.
  I did started hosting my web site at a webhoster that promised 99.99%
uptime and my site is hardly ever up and running. They don't answer my
emails either.
 IS there anyone who have web sites hosted at webhosting service for a
reasonably long time without any problems? IF yes, can you please contact me
and tell me about it? This might be kind of off-topic for both lists, and i
apologize to both lists, so you might want to reply to my email rather than
sending it to list(s).
  Thank you very much.

Gurhan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php