file: 'guestbook.MYI' (errno: 145) when using
LOCK TABLES
Best regards,
Best regards,
Peter Lauri
<http://www.dwsasia.com/> www.dwsasia.com - company web site
<http://www.lauri.se/> www.lauri.se - personal web site
<http://www.carbonfree.org.uk/> www.carbonfree.org.uk - become Carbon Free
Do you have shell access to this server?
Try to access MySQL by using command:
mysql
and then do: show databases;
You could also try to use root as username and leave the password empty. If
it works then it would mean that your MySQL is not setup with any security
or anything.
Did you create a
IF(SUM(IF(Jan IS NULL, 0, Jan))>0, SUM(IF(Jan IS NULL, 0, Jan)), NULL)
This was just a guess :)
-Original Message-
From: C.R.Vegelin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 06, 2006 11:58 AM
To: mysql@lists.mysql.com
Subject: SUM() of 1 and NULL is 1 ?
Hi List,
I need to
Sorry, did not read carefully.
Either you loop thru all tables an do "DELETE FROM table"
Or as someone else suggested, dump the structure, drop database, recreate
from dump.
/Peter
-Original Message-----
From: Peter Lauri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20,
DELETE FROM table
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 10:35 AM
To: mysql@lists.mysql.com
Subject: How to delete all rows
Hi All,
How do I delete all the rows of all the tables(but not
table) in the dat
entries?
Peter Lauri schrieb:
> SELECT * FROM table WHERE id=(SELECT id FROM table ORDER BY id DESC) ORDER
> BY date
This does not limit it to n entries (order by date limit n is not
sufficient as I need last (highest) n ids). And afaik, limit is not
allowed in sub-queries.
--
MySQL General M
You are correct. So that maybe leaves you with a temporary table then :)
-Original Message-
From: Dominik Klein [mailto:[EMAIL PROTECTED]
Sent: Friday, September 15, 2006 4:45 PM
To: mysql@lists.mysql.com
Subject: Re: How to sort last n entries?
Peter Lauri schrieb:
> SELECT * F
And if your MySQL version does NOT support sub queries you can probably just
create a temporary table and then sort that one.
/Peter
-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED]
Sent: Friday, September 15, 2006 4:28 PM
To: mysql@lists.mysql.com
Cc: [EMAIL PROTECTED
Assuming your MySQL version supports sub queries you do like this. I have
never done sub queries my self, but I know the theory :)
SELECT * FROM table WHERE id = (SELECT id FROM table ORDER BY id DESC) ORDER
BY date
/Peter Lauri
www.lauri.se - personal
www.dwsasia.com - company (Web Development
SELECT * FROM table WHERE id=(SELECT id FROM table ORDER BY id DESC) ORDER
BY date
-Original Message-
From: Dominik Klein [mailto:[EMAIL PROTECTED]
Sent: Friday, September 15, 2006 3:41 PM
To: mysql@lists.mysql.com
Subject: How to sort last n entries?
I have a table with primary key "id"
Yes, and this shows that you can not do it will MySQL purely :) But a
scripting language like php can do it for you with a recursive function as
the best option.
/Peter
-Original Message-
From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED]
Sent: Monday, September 04, 2006 7:55 PM
MySQL is not recursive. This might help you:
http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html
/Peter
www.lauri.se - personal web site
www.dwsasia.com - corporate web site
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
abhishek jain
S
Hi,
I am doing this thru the phpmyadmin interface:
ALTER TABLE doc ALTER docts SET DEFAULT CURRENT_TIMESTAMP
However, it returns #1064 - You have an error in your SQL syntax near
'DEFAULTCURRENT_TIMESTAMP' at line 1
As you can see the error shows that DEFAULT an CURRENT_TIMESTAMP ha
Hey,
I have this query:
SELECT team. * ,
COUNT(*) - IF(team_id IS NULL, 1, 0) AS numberofmember
FROM team
LEFT JOIN teammember ON ( team.id = teammember.team_id )
WHERE CONCAT( team.name, team.description ) LIKE '% %'
AND team.status =1
AND team.inviteonly =0
GROUP BY team.id
ORDER BY numberofm
PM
To: mysql@lists.mysql.com
Subject: Re: HELP!
On Tuesday 22 August 2006 10:29, Peter Lauri wrote:
> Hi,
> I did something terrible similar to UPDATE table SET testdate=NOW()
> And I kind of forgot the WHERE lalalala, so now all my records are
screwed.
> Is there any way of actu
Hi,
I did something terrible similar to UPDATE table SET testdate=NOW()
And I kind of forgot the WHERE lalalala, so now all my records are screwed.
Is there any way of actually undoing this? :)
14 AM
To: mysql@lists.mysql.com
Cc: Chris; Peter Lauri
Subject: Re: 1 to many relationship
Peter Lauri wrote:
> Is there not a better way to do that? What will happen there is that a
large
> result set will be created because when you just do "select * from
> customers c, issues i,
First of all, I think your post is intended to the PHP mailing list, this is
the MySQL list.
Assuming that you need to send information to the other web site without
actually entering it, you could setup a system with a simple Web Service
running on your "receiving" web server, and just call it f
AIL PROTECTED]
Sent: Wednesday, August 16, 2006 11:00 AM
To: Peter Lauri
Cc: mysql@lists.mysql.com
Subject: Re: 1 to many relationship
Peter Lauri wrote:
> [snip "Chris"]
> The 'where' clause cuts that down to only matching records between the
> tables. Without the w
[snip "Chris"]
The 'where' clause cuts that down to only matching records between the
tables. Without the where, you'd end up with lots of rows but with the
where it will be fine.
[/snip]
Yes, it cuts it down to that number of records in the end, so the final
result set will just be a few rows t
[snip "Chris"]
If you want multiple customers to be associated with each issue you need
3 tables:
create table customers (customerid int auto_increment primary key,
customername varchar(255));
create table issues (issueid int auto_increment primary key, issuetitle
varchar(255));
create table
Not until we know the logic behind the "code" and how the calculations
should be done.
-Original Message-
From: VenuGopal Papasani [mailto:[EMAIL PROTECTED]
Sent: Monday, August 14, 2006 1:03 PM
To: Peter Lauri; mysql@lists.mysql.com
Subject: Re: query needed
if it is stat
SELECT SUM(IF(code='c1', code, IF(code='c2', code, 0))) - SUM(IF(code='c4',
code, IF(code='c5', code, 0))) FROM datavalue;
-Original Message-
From: VenuGopal Papasani [mailto:[EMAIL PROTECTED]
Sent: Monday, August 14, 2006 11:26 AM
To: mysql@lists.mysql.com
Subject: query needed
Hi,
i
Comment: ALTER is used to change the structure of an table, for example add
an extra column or change the default values etc. Or to add an index or
similar.
-Original Message-
From: Nicholas Vettese [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 03, 2006 9:12 PM
To: mysql@lists.mysql.co
Maybe:
$query = "UPDATE profile SET acct_type='%at', ., genre='$g' WHERE
id=$userid"
/Peter
-Original Message-
From: Nicholas Vettese [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 03, 2006 9:12 PM
To: mysql@lists.mysql.com
Subject: Alter Problem
I am working on a script that loo
What version of MySQL do you have? Depending on that, there are different
methods.
-Original Message-
From: Penduga Arus [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 6:33 PM
To: mysql@lists.mysql.com
Subject: select between date
I want to do a program to display birthday for our
, 2006 6:43 AM
To: mysql@lists.mysql.com
Subject: Re: JOIN table where not in other table
On Wednesday 26 July 2006 11:30 am, Peter Lauri wrote:
> 4.0.27, so that is probably the reason. Any other way then with a sub
> query? I solved it with my "stupid" solution, feels strange to J
: Thursday, July 27, 2006 6:05 AM
To: mysql@lists.mysql.com
Subject: Re: JOIN table where not in other table
On Wednesday 26 July 2006 11:00 am, Peter Lauri wrote:
> The query in full was exactly as you wrote it (but without the typo) :)
Alright, yes, what is your version of MySQL? I'm in
The query in full was exactly as you wrote it (but without the typo) :)
-Original Message-
From: Chris White [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 5:56 AM
To: Peter Lauri
Cc: mysql@lists.mysql.com
Subject: Re: JOIN table where not in other table
On Wednesday 26 July
upport sub queries?
/Peter
-Original Message-
From: Chris White [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 5:37 AM
To: mysql@lists.mysql.com
Subject: Re: JOIN table where not in other table
On Wednesday 26 July 2006 10:31 am, Peter Lauri wrote:
> Best group member,
>
>
I would like to do (in
words):
I want to select all rows in table1 that does not already have an reference
in table2.
Is that understandable?
Best regards,
Peter Lauri
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com
That did it, thank you all!
-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 2:10 AM
To: Peter Lauri
Cc: mysql@lists.mysql.com
Subject: Re: WHERE problem, or is it a problem?
Peter Lauri wrote:
> Best group member,
>
> I have t
nction
What is the problem here? Why can I not do a WHERE COUNT(*)>=31?
Is there any other way to just select the COUNT(*)>=31?
Best regards,
Peter Lauri
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
@lists.mysql.com
Subject: Re: FULL TEXT and Asian languages
Peter Lauri wrote:
> Best group member,
>
> I have a problem. I was going to use FULL TEXT search for my Thai
> client. It is working smooth with English text and wordings, the
> indexing and search works fine.
"The FULLTEXT par
E '%$value%'"
}
If there are many search words, the OR will grow a bit, and OR are not that
fast as I read somewhere.
/Peter
-Original Message-
From: JC [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 20, 2006 10:46 PM
To: Peter Lauri
Cc: mysql@lists.mysql.com
Subject: Re: F
think this screws up the
indexing, and complete sentences are classed as a word. Assume Thai
characters:
Thisisasentenceinthai. ButIcannotsearchforsentenceinthatsearch.
I want to search for "sentence", but can not. How can this be done? And will
the indexing ever work?
Best regards,
P
This is my ugly solution:
SELECT
MAX(IF(articles_attribs.attrib_key='content', articles_attribs.
attrib_value, '')) AS content,
MAX(IF(articles_attribs.attrib_key='description', articles_attribs.
attrib_value, '')) AS description,
MAX(IF(articles_attribs.attrib_key='keyword', articles_attribs.
at
?
Best regards,
Peter Lauri
)
ORDER BY part.joindate DESC , part.prefname, part.email
LIMIT 0 , 30
MySQL said:
#1104 - The SELECT would examine more rows than MAX_JOIN_SIZE. Check your
WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT
is ok
++
Best regards,
Peter Lauri
Search the Manual for CONCAT.
SELECT
/Peter
-Original Message-
From: z247 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 04, 2006 10:02 PM
To: mysql@lists.mysql.com
Subject: Newbie - CREATE VIEW Question
Say I have the following tables;
siteID,name
--
site
SELECT * FROM table WHERE some_field IS NOT NULL;
-Original Message-
From: Jørn Dahl-Stamnes [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 25, 2006 2:24 PM
To: mysql@lists.mysql.com
Subject: SELECT and NULL
This my be a dumb question, but I have search the docs without finding the
answ
You can do something like:
mysqldump --no-data
-Original Message-
From: Xiaobo Chen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 9:11 PM
To: mysql@lists.mysql.com
Subject: Just need script for creating tables
Hi, all
If I use 'mysqldump', I will get the script to create t
SELECT IF(col1=3, (Select col2 from table2 where table2.id = 1), (Select
col2 from table3 where table3.id = 1)) FROM table1 WHERE id=1;
That should do it.
-Original Message-
From: Thomas Lundström [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 7:51 PM
To: Song Ken Vern-E11804
C
want the latest date, then you do ORDER BY i.item_updated DESC GROUP
BY i.product_id
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Kim Christensen
Sent: Monday, June 12, 2006 9:15 PM
To: Peter Lauri
Cc: MySQL List
Subject: Re: Limiting results from join
--
Here's what it looks like right now:
SELECT * FROM products p
INNER JOIN manufactors m ON m.manufactor_id = p.manufactor_id
INNER JOIN items i ON i.product_id = p.product_id
The problem is, that each entry in "products" may occur more than once
in "items", and they are
Btw, better to ask and look stupid, then not to ask and be stupid... But
this question does not give you a stupid look, more a look of a person
seeking perfection :)
-Original Message-
From: Jesse [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 7:31 PM
To: MySQL List
Subject: How
I say: My S-Q-L
-Original Message-
From: Jesse [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 7:31 PM
To: MySQL List
Subject: How To Pronounce MySQL
This may be a really stupid question, but I hate looking stupid if I can
avoid it. :-)
I have been using Microsoft SQL Server fo
Can you run rsync on Windows environment?
-Original Message-
From: Tim Lucia [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 06, 2006 6:32 PM
To: 'Peter Lauri'; 'Jason Dimberg'; mysql@lists.mysql.com
Subject: RE: UPDATE from one server to another
rsync is a *nix utili
I am not that clever, but I would just create a Web Service (WS) on the
Server that the Laptop call whenever the laptop want to push the date into
the server database.
I heard something about something called rsync, but I think that is
restricted to Linx, Unix.
/Peter
-Original Message-
Solved it by:
SELECT table_a.name , if( table_a.id = table_b.table_a_id, 1, 0 ) AS
theindicator
FROM table_a
LEFT OUTER JOIN table_b ON ( table_a.id = table_b.table_a_id )
/Peter
Hi,
I have a table table_a and table_b:
table_a {
id
name
}
table_b {
table_a_id
b_value
}
Table
Hi,
I have a table table_a and table_b:
table_a {
id
name
}
table_b {
table_a_id
b_value
}
Table A is a table with names, and table B is a table with values for a
specific name (optional, therefore a specific table).
I would like to select all records in A, done by:
SELECT name FROM table_a;
It was just to copy the files from the DATA folder in the installation
directory. That was easier then I thought.
-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 24, 2006 6:52 AM
To: mysql@lists.mysql.com
Subject: Urgent problem
Best group member,
My
Best group member,
My computer stopped working. And I was able to install Windows on another
partition and now I face one problem. I was running Windows with MySQL 4.1.
I have all C: working, and can access all files.
The first question: Can I recover that data from MySQL?
The second question:
| 999 | 2 |
| 18 | Other | 999 | 2 |
| 19 | Tools | 999 | 3 |
| 20 | R&D Document | 999 | 3 |
++---+--+---+
Best regards,
Peter Lauri
--
M
Hi all,
Assume that I want to insert "Juanita O'Connell" into my database. How do I
do that? The problem is the ' in her last name. If I just put it in it will
be
INSERT INTO thetable (name) VALUES ('O'Connell');
And that does not work :) How can I sol
Best groupmember,
I run version 3.23.58 and need to use something similar to DATEDIFF and
TIMEDIFF to calculate difference between two a timestamp and
current_timestamp().
Is there any other function that is working for version 3.23.58 that do the
same job?
Best regards,
Peter Lauri
--
MySQL
o not
use PHP to try to get a query to work.
Try to understand the SUBSTRING command and CONCAT command first. Read the
documentation on www.mysql.com.
/Peter
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 02, 2006 5:07 PM
To: Peter Lauri
S
x27; ORDER BY
CONCAT(SUBSTRING(temptext, 7, 2),SUBSTRING(temptext, 4, 2),
SUBSTRING(temptext, 1, 2)) DESC LIMIT 1
/Peter
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 02, 2006 3:28 PM
To: Peter Lauri; mysql@lists.mysql.com
Subject: Re: Getting
You should start by using MySQL date as the standard for date: -MM-DD
After that it is simple:
SELECT * FROM documents WHERE doc_date<2006-05-02 ORDER BY doc_date DESC
LIMIT 1;
Othervise you could use MySQL function to take sub strings and create a
field in the query that extract it as 06-05
Thanks. That worked smooth as silk!
-Original Message-
From: Dan Nelson [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 20, 2006 11:42 AM
To: Peter Lauri
Cc: mysql@lists.mysql.com
Subject: Re: where group and inner join
In the last episode (Apr 19), Dan Nelson said:
> It's u
R JOIN tour_scorecard_hole tsh ON tps.scorecard_hole_id=tsh.id
WHERE sum(tps.strokes) < 90
GROUP BY tps.tour_player_id
ORDER BY
score,
back_9;
It gives me error 1111: Invalid use of group function
Where does the error come from? And how would I solve this?
Best regards,
Peter Lauri
--
My
]
Sent: Tuesday, April 11, 2006 9:55 PM
To: Peter Lauri
Cc: mysql@lists.mysql.com
Subject: Re: Making result rows to one row
Peter,
> Peter Brawley said:
>
> SELECT
> ...,
> GROUP CONCAT(LPAD(strokes,3,' ') SEPARATOR '') AS ' 1 2 3 4 5 6 7
>
tour_player_score tps INNER
JOIN tour_scorecard_hole tsh ON tps.scorecard_hole_id=tsh.id GROUP BY
tps.tour_player_id ORDER BY score;
Best regards,
Peter Lauri
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED]
Sent: Monday, April 10, 2006 10:45 AM
To: mysql@lists.mysql.com
Subject: Making result rows to one row
Best group member,
Many of you probably do not understand the question; neither would I if
someone ask me, so I will
s5 s6 s7 s8 s9
6 4 5 3 5 4 4 3 6
Can this be done?
Best regards,
Peter Lauri
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
That did work very well, thank you. The DEFAULT value was 0. I am getting
closer in my attempt to generate a leaderboard without php :)
From: Gabriel PREDA [mailto:[EMAIL PROTECTED]
Sent: Monday, April 10, 2006 7:16 PM
To: Peter Lauri
Cc: mysql
Haha, yes I know that. I just created the code in the email editor. :)
-Original Message-
From: Barry [mailto:[EMAIL PROTECTED]
Sent: Monday, April 10, 2006 5:19 PM
To: mysql@lists.mysql.com
Subject: Re: Do if and elseif and other calculations
Peter Lauri wrote:
> Best groupmem
#x27;overpar']>=3) diff = $diff - $Row['overpar']*
$Row['number_of_holes'] + 2;
}
Anyway to move this to MySQL and just have one row containing the diff?
Best regards,
Peter Lauri
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Best group member,
I do this query
SELECT tour_player_score.strokes AS score, tour_scorecard_hole.par AS par,
score-par AS overpar
FROM `tour_player_score`, tour_scorecard_hole WHERE tour_player_id=175 AND
tour_scorecard_hole.id=tour_player_score.scorecard_hole_id
It gives error: [localhost] ER
Is this the only way? I was hoping that phpMyAdmin would have a nice
function for this. What is the reason for not being able to use String types
when using UFT-8? Maybe I have to learn more about the UFT-8 to find the
answer about that?
Best regards,
Peter Lauri
_
From
fields with different charset?
Best regards,
Peter Lauri
Have you tried the GROUP BY?
Make something like (not sure of exact syntax, check the manual for that):
SELECT COUNT(*) AS cnt, data1_id FROM data1_id GROUP BY data1_iD;
/Peter
-Original Message-
From: Mark Phillips [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 14, 2005 11:31 PM
someone give an example of how a database can be hijacked or destroyed?
What kind of queries is more vulnerable then others?
Best regards,
Peter Lauri
Best groupmember,
I am in the situation to develop an web site for a Thai school and it will
be in Thai and English. How can I setup so that my tables understand the
Thai decoding (think it is UTF-8)?
Thanks
Best group member,
I have a field called expiredate of type ‘date’.
I would like to add 17 days to the expiredate without doing any scripting, is
that possible?
Example:
Expiredate is 2005-11-30 and I want to extend the expiredate
with 17 days. Is there any function in MySQL that a
and
UPDATE queries on the database B.
Best regards,
Peter Lauri
76 matches
Mail list logo