Hey,
i have a table called users which has my users in it, each have a uid field.
I also have a stories table which has stories in it each with a sid field
for each story but also a uid field so i know which user the story belongs
to.
i want to write a query that will display the story
AndrewJames schrieb:
Hey,
i have a table called users which has my users in it, each have a uid
field.
I also have a stories table which has stories in it each with a sid field
for each story but also a uid field so i know which user the story
belongs
to.
i want to write a query that
AndrewJames schrieb:
Hey,
i have a table called users which has my users in it, each have a uid
field.
I also have a stories table which has stories in it each with a sid field
for each story but also a uid field so i know which user the story
belongs
to.
i want to write a query that
AndrewJames schrieb:
Hey,
i have a table called users which has my users in it, each have a uid
field.
I also have a stories table which has stories in it each with a sid field
for each story but also a uid field so i know which user the story
belongs
to.
i want to write a query that
Hi,
abdulazeez alugo wrote:
Date: Sun, 19 Apr 2009 23:19:56 +0100
From: andy-li...@networkmail.eu
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: Need help with mysql prob
Hi Alugo,
Hi Andy,
Thanks for your prompt response. However, since tbl1_id has
Date: Mon, 20 Apr 2009 08:06:05 +0100
From: andy-li...@networkmail.eu
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: Need help with mysql prob
Hi,
abdulazeez alugo wrote:
Date: Sun, 19 Apr 2009 23:19:56 +0100
From: andy-li...@networkmail.eu
To: defati
Hi Alugo,
abdulazeez alugo wrote:
Hi Andy,
Thank you very much you have been really very helpful. All those
mistakes you pointed at in the script about the apostrophe and others,
are simple mistakes I just made in the rush of typing the message; and
yes $conn is the result from
Date: Mon, 20 Apr 2009 13:03:14 +0100
From: andy-li...@networkmail.eu
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: Need help with mysql prob
Hi Alugo,
abdulazeez alugo wrote:
Hi Andy,
Thank you very much you have been really very helpful. All those
mistakes
Hi guys,
I'm having a really terrible problem with my mysql coding and I'ld appreciate
any help I can get on this cause it's really driving me crazy.
I have two tables and I've succeeded in creating a one to many relationship
between both table but the problem I'm having is that I dont know
Hi,
Now I have successfully created a relationship between the two tables but how
do I make sure the value of tbl1_id in tbl1 is equal to the value of tbl1_id in
tbl2???
MySQL handles this for you. Simply INSERT the value into tbl1, then
INSERT the value of tbl1_id in tbl2. Then try
Date: Sun, 19 Apr 2009 22:50:20 +0100
From: andy-li...@networkmail.eu
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: Need help with mysql prob
Hi,
Now I have successfully created a relationship between the two tables but
how do I make sure the value of tbl1_id
Hi Alugo,
Hi Andy,
Thanks for your prompt response. However, since tbl1_id has an auto_increment value in tbl1, mysql is actually generating the values for it automatically.
Ah, I see your point. I'm guessing by your code you're using PHP? If
so call mysql_insert_id() after you've
Hi Abdul-
you may want to check this thread out regarding the same issue...
http://www.webmasterworld.com/php/3565843.htm
On Apr 19, 2009, at 3:23 PM, abdulazeez alugo wrote:
Hi guys,
I'm having a really terrible problem with my mysql coding and I'ld
appreciate any help I can get on
Date: Sun, 19 Apr 2009 23:19:56 +0100
From: andy-li...@networkmail.eu
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: Need help with mysql prob
Hi Alugo,
Hi Andy,
Thanks for your prompt response. However, since tbl1_id has an
auto_increment value in tbl1
I hate when somebody put in Subject line something like I just did but after 15
minutes to try to be specific just with one short sentence - I gave up. So, you
can hate me - I understand (though, help with my problem too) :-)
I have let say 3 tables people, organization, addresses. and they
On Dec 17, 2008, at 2:56 PM, Lamp Lists wrote:
I hate when somebody put in Subject line something like I just did
but after 15 minutes to try to be specific just with one short
sentence - I gave up. So, you can hate me - I understand (though,
help with my problem too) :-)
I have let
Hi Afan
Why not prefix your field names with the table name?
select
p.first_name AS person_first_name,
p.last_name AS person_last_name,
p.status AS person_status,
p.date_registered AS person_date_registered,
o.org_id AS organization_org_id,
o.org_name AS organization_org_name,
-Original Message-
From: Lamp Lists [mailto:lamp.li...@yahoo.com]
Sent: Wednesday, December 17, 2008 2:57 PM
To: mysql@lists.mysql.com
Subject: need help with query...
...snip...
I have let say 3 tables people, organization, addresses. and they are
linked to each other with column
-Original Message-
From: Andy Shellam [mailto:andy-li...@networkmail.eu]
Sent: Wednesday, December 17, 2008 3:29 PM
To: Lamp Lists
Cc: mysql@lists.mysql.com
Subject: Re: need help with query...
Hi Afan
Why not prefix your field names with the table name?
select
p.first_name
From: Andy Shellam andy-li...@networkmail.eu
To: Lamp Lists lamp.li...@yahoo.com
Cc: mysql@lists.mysql.com
Sent: Wednesday, December 17, 2008 2:29:08 PM
Subject: Re: need help with query...
Hi Afan
Why not prefix your field names with the table name?
select
Jerry Schwartz wrote:
-Original Message-
From: Andy Shellam [mailto:andy-li...@networkmail.eu]
Sent: Wednesday, December 17, 2008 3:29 PM
To: Lamp Lists
Cc: mysql@lists.mysql.com
Subject: Re: need help with query...
Hi Afan
Why not prefix your field names with the table name?
select
Hi,
Hi Andy,
the reason I can't use this because fields (columns) in select
statement (p.first_name, p.last_name,...) are actually dynamically
created. In my project different client will select different fields
to be shown. 99% will select first_name, and last_name, but some don't
care
From: Andy Shellam andy-li...@networkmail.eu
To: Lamp Lists lamp.li...@yahoo.com
Cc: mysql@lists.mysql.com
Sent: Wednesday, December 17, 2008 2:48:31 PM
Subject: Re: need help with query...
Hi,
Hi Andy,
the reason I can't use this because fields (columns
Hello all,
I get this error when compiling:
Object file format error in: /usr/sw: read_cur_obj_info: File is not a
regular file
I have the same thing in /usr/sw as you'd find in /usr/local
I'm using gcc 4.0.2 and the tru64 native compiler.
I tried taking off a few configure directives, such as
Hi,
I'm trying to customize permissions for a particular database and have
run into an odd problem. I'm hoping someone on this list can suggest
what I'm doing wrong. The setup is as follows:
Database: property
User '[EMAIL PROTECTED]' should be able to run SELECTs on this database
User '[EMAIL
Dear All,
I am looking for help as I want to make a website like orkut.
can u plz help me in designing the Data Table and Queries
--
Thanks Regards,
Tanveer Bhurani
The Bend on the road is not the end of the Road..., Unless you forget
to make the turn
what rate of pay are you offering?
On Mon, Nov 24, 2008 at 5:13 AM, Tanveer Bhurani
[EMAIL PROTECTED]wrote:
Dear All,
I am looking for help as I want to make a website like orkut.
can u plz help me in designing the Data Table and Queries
--
Thanks Regards,
Tanveer Bhurani
The Bend on
Hi,
For mysql stress test suite (mysql-stress-test.pl) to execute, it requires
--stress-tests-file to be provided which contains the list of tests to be
executed. As per the documentation the default name of the file is
stress-test.txt and it will be located under ./mysql-test directory.
But I
When I perform a dump in mysql5 to mysql 4 DB, I get the error (below).
Does anyone know how I can resolve this?
QUERY (windows server from the cmd prompt)
mysqldump --lock-tables --user=root [SOURCE DB] | mysql --user=[USERNAME]
--password=[PASSWORD] --host=[HOST] [TARGET DB]
ERROR
Shaun Adams schrieb:
When I perform a dump in mysql5 to mysql 4 DB, I get the error (below).
Does anyone know how I can resolve this?
QUERY (windows server from the cmd prompt)
mysqldump --lock-tables --user=root [SOURCE DB] | mysql --user=[USERNAME]
--password=[PASSWORD]
Hi Saul,
I need to use C++ and I'm not writing a web application.
Thanks anyway.
Kandy
I have done queries to the database in PHP with variables like month but
easily can select from a range of time and data to produce the same
results, the output goes directly to the web so if that is what
Hi Kandy,
this could be the query you are looking for. It should return record
with the closest timestamp to your required time:
(SELECT TIMEDIFF('20080815091907', timestamp_column) AS diff, t.* FROM
table1 t
WHERE timestamp_column = '20080815091907'
ORDER BY timestamp_column DESC LIMIT 1
)
Kandy Wong wrote:
Hi Saul,
I need to use C++ and I'm not writing a web application.
Thanks anyway.
you can do something like:
select min(abs(timediff(targettime,timestamp))) from table where
condition ;
if you use the libmysql you can get the result as strings back (the method i
Kandy Wong wrote:
And what is the good connector (C++ to MySQL) to use?
MySQL++ (http://tangentsoft.net/mysql++/) has native Date, Time, and
DateTime data types. You can convert to these types implicitly:
mysqlpp::DateTime dt = row[my_column];
Row::operator[] doesn't return
PROTECTED]
Sent: Friday, August 15, 2008 2:36 AM
To: Saul Bejarano
Cc: mysql@lists.mysql.com
Subject: Re: Need help to query with timestamp in C++
Hi Saul,
I need to use C++ and I'm not writing a web application.
Thanks anyway.
Kandy
I have done queries to the database in PHP with variables like month
Hi Dusan,
Thank you so much. It works!
Kandy
Hi Kandy,
this could be the query you are looking for. It should return record
with the closest timestamp to your required time:
(SELECT TIMEDIFF('20080815091907', timestamp_column) AS diff, t.* FROM
table1 t
WHERE timestamp_column =
Hi,
I need to write a C++ program in a Linux environment to query with a
timestamp.
The user will only provide with an approximate time so I'd like to know
how can I write a program or a query to return the closest data.
The followings are the timestamp in the MySQL database:
| 2008-08-05
I have done queries to the database in PHP with variables like month but
easily can select from a range of time and data to produce the same
results, the output goes directly to the web so if that is what you are
seeking for, I can help with PHP.
Saul
Kandy Wong wrote:
Hi,
I need to write
I want to make sure that my master and slave machines are in sync. From
what I hear, mk-table-checksum is a good way to do that. So, I downloaded
and installed it on my Linux box (the slave). So, here's what I've got:
WS2003 Master (IP 192.168.1.10)
Ubuntu 8.04 Linux Slave (IP
Rakesh!
The distance_sphere and makebox2d functions are specific to postgis.
MySQL GIS Implementation is based on the Open GIS Simple SQL
Specification (read more on www.opengeospatial.com). The SetSRID is also
not in the specification as far as I know (it should be, but I can't
find it),
Hi All
I looking for the stated functions. Earlier I was using postGIS in that
they are present i am wondering if I can get similar kind of method in
MySql.I am Using Mysql 5.0.51a version.
1. I am trying to retrieve the distance between two geometries in the
table using the following
Hello All.
I'm new to mysql. I would like to issue a query from the command line
and pass the result to an update done on the command line within the
same script. See below.
My question is how can I run a select from the command line and pass the
values to an update
SELECT SYS_ID, SYS_LOCATION,
[snip]
I'm new to mysql. I would like to issue a query from the command line
and pass the result to an update done on the command line within the
same script. See below.
My question is how can I run a select from the command line and pass the
values to an update
SELECT SYS_ID, SYS_LOCATION,
[snip]
SELECT SYS_ID, SYS_LOCATION, SYS_IP FROM PROD_SERVER;
UPDATE TEST_SERVER
SET SYS_ID = value passed from above
SYS_LOCATION = value passed from above
SYS_IPADDRESS = value passed from above;
[/snip]
And here http://dev.mysql.com/doc/refman/5.1/en/user-variables.html
--
: executing query from the command line -- need help
[snip]
SELECT SYS_ID, SYS_LOCATION, SYS_IP FROM PROD_SERVER;
UPDATE TEST_SERVER
SET SYS_ID = value passed from above
SYS_LOCATION = value passed from above
SYS_IPADDRESS = value passed from above;
[/snip]
And here http
, 2008 11:29 AM
To: Brown, Charles; mysql@lists.mysql.com
Subject: RE: executing query from the command line -- need help
[snip]
SELECT SYS_ID, SYS_LOCATION, SYS_IP FROM PROD_SERVER;
UPDATE TEST_SERVER
SET SYS_ID = value passed from above
SYS_LOCATION = value passed from above
thanks
-Original Message-
From: obed [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 23, 2008 10:49 PM
To: Jay Blanchard
Cc: Brown, Charles; mysql@lists.mysql.com
Subject: Re: executing query from the command line -- need help
On Jan 23, 2008 2:36 PM, Jay Blanchard [EMAIL PROTECTED
Hi all,
i need to use Eclipse(java SDK) to connect to MYSQL DB,
i write the following code for connection, but when i run it no thing
happen, no output appear, when i debug it, i found that the debuger was
stopped @ the line
conn=DriverManager.getConnection(connectionURL,Eman,Eman);
Guys, just wanted to thank you again for helping me with
the sql statement that I needed. I was able to sorted using
php and I was able to display the correct result.
Thanks again!!1
Nestor :-)
On Nov 6, 2007 7:37 AM, Néstor [EMAIL PROTECTED] wrote:
You guys are correct, that is exactly what
--- [EMAIL PROTECTED] wrote:
Néstor wrote:
I think you'd best begin by normalising your
database. Something along
these lines:
very true indeed, that would save you major headaches
when right after finishing the demo, someone would
say, can we add a 18 gallon pledge? what about a 25?
You guys are correct, that is exactly what happened.
I must thing of this in the future.
At this moment I have a lot of other projects to take care, that it is
eaiser for me to read the information into an associative array with
the columns and the values and sort the array and then print the
I can do simple select statements but I need your brains to create query
statment.
I am using mysql 4.0 in my 1and1 site.
I have a table that has 8 fields, one is the agency field and the other 7
are
*tip* values on saving water and the value of this field is either 0 or an
amount.
I have a table with about 9 fields, and record ID field an
agency name field and the # of gallons that a erson pledges to save:
--
|ID| agency| 5g | 8g | 10g | 12g | 15g | 18g | 20g |
--- Enrique Sanchez Vela [EMAIL PROTECTED]
wrote:
Date: Mon, 5 Nov 2007 15:01:59 -0800 (PST)
From: Enrique Sanchez Vela [EMAIL PROTECTED]
Subject: Re: Need help creating query statement
To: Néstor [EMAIL PROTECTED]
--- Néstor [EMAIL PROTECTED] wrote:
I can do simple select
Enrique that is pretty good and close to what I need.
On top of what you have generously provide, I guess I can just put
each gallon field into an array an then sort the array to display the
first 5 gallon fields per agency. Is there an easier way?
Thanks,
Nestor :-)
On 11/5/07, Enrique
Néstor wrote:
I can do simple select statements but I need your brains to create query
statment.
I am using mysql 4.0 in my 1and1 site.
I have a table that has 8 fields, one is the agency field and the other 7
are
*tip* values on saving water and the value of this field is either 0 or an
Hello all:
I have two tables:
1. MenuAccess:
accessId
fkMenuId
fkGroupid
View
Execute
2. MenuOptions
MenuId
MenuName
I would like to get all of the records in MenuOptions and any record in
MenuAccess with a specific fkGroupid. For example:
A. MenuAccess
Imran wrote:
Hello all:
...
I would like to get all of the records in MenuOptions and any record in
MenuAccess with a specific fkGroupid. For example:
...
IIf I run a query for fkgroupid = 1 I should get
AccessId fkMenuID fkgroupid view execute
I'm trying to get some 'release/version numbers' to sort properly.
mysql SELECT ReleaseID, Name FROM releases ORDER BY Name DESC;
+---+-+
| ReleaseID | Name|
+---+-+
|18 | Unspecified |
|20
Daevid Vincent wrote:
I'm trying to get some 'release/version numbers' to sort properly.
mysql SELECT ReleaseID, Name FROM releases ORDER BY Name DESC;
+---+-+
| ReleaseID | Name|
+---+-+
|18 |
-Original Message-
From: Jay Pipes [mailto:[EMAIL PROTECTED]
Sent: Friday, October 12, 2007 2:07 PM
To: Daevid Vincent
Cc: mysql@lists.mysql.com
Subject: Re: Need help with a natural sort order for
version numbers and release code names
Daevid Vincent wrote:
I'm trying
Here's my full test solution:
use test;
drop table if exists releases;
create temporary table releases
(
releaseid int(10) unsigned not null auto_increment primary key,
name varchar(255)
)engine=myisam;
insert into releases ( name ) values
( 'Unspecified' ),
( 'Next Patch' ),
(
Oh, and here's the output (Sorry):
+---+-+
| releaseid | name|
+---+-+
| 1 | Unspecified |
| 2 | Next Patch |
| 3 | LOCset |
| 4 | Abashiri|
|
I'm trying to delete a subset of items in a table. The problem is, I don't
want to query for the subset first, store the results and then run a series
of delete queries. I believe this is a rather basic issue that has a
well-accepted, simple solution which I am ignorant of. There are two
relevant
Thanks Brent, good tip. Works like a charm.
On Jun 14, 2007, at 7:42 PM, Brent Baisley wrote:
Here's a little trick. Get your DELETE query working as a SELECT.
Then replace everything before FROM with DELETE tablename.
SELECT order_items.ord_id FROM order_items LEFT JOIN orders ON
- Original Message -
From: Ben Liu [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Thursday, June 14, 2007 3:11 PM
Subject: need help with delete query
I'm trying to delete a subset of items in a table. The problem is, I don't
want to query for the subset first, store the results
Hi All,
I was able to load data properly.
We need to set the parameter
set session collation_database=latin1_swedish_ci;
set session character_set_database=latin1;
please check this url for more info
http://lists.mysql.com/commits/16915
On 5/19/07, Ananda Kumar [EMAIL PROTECTED] wrote:
Hi
Hi All,
I am loading data into mysql database using LOAD DATA INFILE. After the load
i am getting this error.
Warning | 1366 | Incorrect string value: '\xE9cor' for column
'CATEGORY_NAME' at row 2137 .
My database character set is as below
character_set_database | utf8
character_set_client
Also friends,
When i see this data in the vi editor it looks like this Other Home DÃ(c)cor
Just wanted to give information. Please help me.
regards
anandkl
On 5/19/07, Ananda Kumar [EMAIL PROTECTED] wrote:
Hi All,
I am loading data into mysql database using LOAD DATA INFILE. After the
load
The following query works just fine:
SELECT B.BusNum, COALESCE(CampCount.Cnt,0) As Kids, B.CamperCapacity,
COALESCE(CounselorCount.Cnt,0) As Adults, B.AdultCapacity
FROM Buses B
LEFT JOIN (SELECT BusID,Count(*) As Cnt FROM Campers GROUP BY BusID) AS
CampCount ON CampCount.BusID=B.ID
LEFT
Hi Jesse,
Jesse wrote:
The following query works just fine:
SELECT B.BusNum, COALESCE(CampCount.Cnt,0) As Kids, B.CamperCapacity,
COALESCE(CounselorCount.Cnt,0) As Adults, B.AdultCapacity
FROM Buses B
LEFT JOIN (SELECT BusID,Count(*) As Cnt FROM Campers GROUP BY BusID)
AS CampCount ON
COALESCE(CampCount.Cnt,0) + COALESCE(CounselorCount.Cnt,0) as GT
Duuuh. Why didn't I think of that. What is MySQL's issue with referring to
the variables (As assignments, whatever you want to call them)? I've had
issues like this in situations like this one, when trying to use them in the
Jesse wrote:
COALESCE(CampCount.Cnt,0) + COALESCE(CounselorCount.Cnt,0) as GT
Duuuh. Why didn't I think of that. What is MySQL's issue with
referring to the variables (As assignments, whatever you want to
call them)? I've had issues like this in situations like this one,
when trying to
Hi All,
This is my procedure, i am using cursor to access data one row by one. The
cursor is looping twice, though i have only one row data in the DB
table(playersloginfo). Can any body tell me why cursor is looping twice and
how can i control it, And please explain me what is this declare
this message in context:
http://www.nabble.com/need-help-urgent-tf3491135.html#a9749875
Sent from the MySQL - General mailing list archive at Nabble.com.
://www.nabble.com/need-help-urgent-tf3491135.html#a9749875
Sent from the MySQL - General mailing list archive at Nabble.com.
name is ID and I want to retrieve
data
from another field LAT such that at a time LAT values for ID's 1,2,3 are
taken then for 3,4,5 then for 4,5,6 so on till table ends.
--
View this message in context:
http://www.nabble.com/need-help-urgent-tf3491135.html#a9749875
Sent from the MySQL
[EMAIL PROTECTED] jim]# mysqladmin -u [EMAIL PROTECTED] password new_password
mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER
privilege for this operation'
HUH? What's wrong? :
[EMAIL PROTECTED] jim]# mysql -u [EMAIL PROTECTED]
Welcome to the MySQL
OK, I think we've solved this one.
Procedure:
[EMAIL PROTECTED] ~]# urpme MySQL-client MySQL MySQL-common
[EMAIL PROTECTED] ~]# mv /var/lib/mysql /var/lib/mysql.old
[EMAIL PROTECTED] ~]# urpmi MySQL-client-5.0.27-3mdv2007.1
MySQL-5.0.27-3mdv2007.1 MySQL-common-5.0.27-3mdv2007.1
This series
Hi All,
I'm working on a Intranet database with a few tables to allow all
the workers from the company to access it.
However, I'm facing a problem with a QUERY. I've did try to use
JOIN but I'm not able to get the results I need...
I have 3 tables (concerning this problem):
Table 'Quotes'
I would like to do a SELECT that would return all the fields in the
'Quotes' table plus the client info and plus the product info but
only if available. If product info is not available I would like to
get a result having all 'Quotes' info and 'Clients' info.
My query is:
SELECT * FROM
From Davor:
Try this:
SELECT * FROM `Quotes` LEFT OUTER JOIN `Products`
ON (`Products`.`QuoteID`=`Quotes`.`QuoteID`)
LEFT OUTER JOIN `Clientes` ON
(`Clientes`.`ClientID`=`Quotes`.`ClientID`)
WHERE `Quotes`.`QuoteID`=6936
Dundo
Still the same... :(
When a QuoteID from Quotes is not available
Olexandr Melnyk wrote:
I din't know about listiтg multiple tables in the JOIN clause up to now,
but anyways it looks like QuoteId from the Products table is overriding
the same field from the Quotes table. Try to replace the asterisk with
an explicit list of fields you want to get.
Hi,
Do you mean that I should replace SELECT * FROM
with SELECT field1, [field2],[...] FROM?
Yes.
If so, I need to specify the table name like SELECT
Clients.Name correct?
You only need to do that when 2 tables have the same column name. In
general, though, it's good practice to always
From Chris,
Do you mean that I should replace SELECT * FROM with SELECT field1,
[field2],[...] FROM?
Yes.
If so, I need to specify the table name like SELECT Clients.Name
correct?
You only need to do that when 2 tables have the same column name. In
general, though, it's good practice to
2007/1/18, Nuno Oliveira [EMAIL PROTECTED]:
Hi, thanks for the reply (you should reply to the list also)
Heh, that was the default Gmail behaviour.
Do you mean that I should replace SELECT * FROM with SELECT field1,
[field2],[...] FROM?
It is generally a good pratice to keep away from
Sounds more like a PHP error than a MySQL error.
-Original Message-
From: John [mailto:[EMAIL PROTECTED]
Sent: Monday, December 04, 2006 12:53 AM
To: mysql@lists.mysql.com
Subject: Error. Need help (Bad arguments.)
I get this error:
Warning: implode(): Bad arguments. in
/home/b/cl
I get this error:
Warning: implode(): Bad arguments. in
/home/b/cl/TP2/admin/defaults.php on line 102
102-104 Code is:
{
$cat_array=explode(:,$_POST['cat_str']);
}
Ideas?
I would like to prohibit the value 'xxx' on my column title, and if it
does contain the value I would like to create an exception by
assigning 'xxx' to the primary key id which is int(5).
This is what I do but I get an error on its creation so I guess it's
not the right way:
CREATE TRIGGER
At 16:23 +0200 10/7/06, Patrick Aljord wrote:
I would like to prohibit the value 'xxx' on my column title, and if it
does contain the value I would like to create an exception by
assigning 'xxx' to the primary key id which is int(5).
This is what I do but I get an error on its creation so I
Hi Patrick,
Patrick Aljord wrote:
I would like to prohibit the value 'xxx' on my column title, and if it
does contain the value I would like to create an exception by
assigning 'xxx' to the primary key id which is int(5).
This is what I do but I get an error on its creation so I guess it's
not
I meant the error is:
mysql CREATE TRIGGER testref BEFORE INSERT ON bookmarks
- FOR EACH ROW
- BEGIN
- IF NEW.title LIKE '%xxx%' THEN
- SET NEW.id ='xxx';
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for
thanx it works the trigger is created successfully but it has no
effect. here it is:
delimiter //
create trigger testref before insert on bookmarks
for each row
begin
declare dummy char(2);
if new.title like '%xxx%'
then
set new.id='xxx';
end if;
end;
//create
On 10/7/06, Patrick Aljord [EMAIL PROTECTED] wrote:
thanx it works the trigger is created successfully but it has no
effect. here it is:
delimiter //
create trigger testref before insert on bookmarks
for each row
begin
if new.title like '%xxx%'
then
set new.id='xxx';
Hlo,
We have all our tables as Innodb type. As I understand the variable
key_buffer_size is used only for MyISAM tables. Currently we have this var set
to 256M on a 4GB RAM machine. Only the Temporary tables created using (CREATE
TEMPORARY TABLE) will be of MyISAM type. And there are a lot of
Remember that if you dont use an index on a colum and you search by that
criteria, there would be a whole table scan :(.
Its recommended that you always index those columns that appear on a search
and/or an order (where column_a='yyy' order by column_b) and those involved
on joins; generally
Hello All,
Need a suggestion for this:
We have tables which have very few number of rows ( less than 600 ). For a long
period of time the number of rows are going to remain almost the same.
1) Is it better to index the columns of such tables?
2) There are Joins on this table and then a
Helo all,
I need explanation on EXPLAIN here.
I am trying to JOIN 2 tables TBL1 and TBL2 on TBL1.fld_id = TBL2.fld_id . And
finally I filter out the results that i need in the where clause using
where TBL1.fld_col = 100;
Running an EXPLAIN shows that it is an impossible where condition. This
Hi,
I am trying to JOIN 2 tables TBL1 and TBL2 on TBL1.fld_id
= TBL2.fld_id . And finally I filter out the results that
i need in the where clause using
where TBL1.fld_col = 100;
Running an EXPLAIN shows that it is an impossible where
condition. This may be because there may be no rows
Hi,
My mysql is crashing. Below table has the values it logs in the .err file
before restarting. I am using the large.cnf file.
The parameters I have changed are below. Rest are default values.
#for performance SSR
log=/var/log/mysql-queries.log
join_buffer_size=1M
max_connections=300
101 - 200 of 912 matches
Mail list logo