- Original Message -
From: kalin mintchev [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 14, 2004 6:05 PM
Subject: syntax question..
hi everybody..
can somebody please explain what is wrong with this command:
select t1.data from table1 as t1 where t1.zip=(select
.
you may also cause a conflict by using the database alias (t1) as the
name
of the result
Peter
-Original Message-
From: kalin mintchev [mailto:[EMAIL PROTECTED]
Sent: 14 November 2004 23:06
To: [EMAIL PROTECTED]
Subject: syntax question..
hi everybody..
can somebody please explain
Kalin,
Kalin thanks to all... yes, Rhino - i'm new. my first
Kalin post. the version is the problem indeed. it's
Kalin 4.0.13-standard. how would i achieve the same
Kalin query in this version?...
You'll need to provide the following:
(1) What is the result you want to achieve?
(2) What are the
Kalin,
Kalin thanks to all... yes, Rhino - i'm new. my first
Kalin post. the version is the problem indeed. it's
Kalin 4.0.13-standard. how would i achieve the same
Kalin query in this version?...
You'll need to provide the following:
(1) What is the result you want to achieve?
well:
- Original Message -
From: kalin mintchev [EMAIL PROTECTED]
To: Adam [EMAIL PROTECTED]
Cc: MySQL General [EMAIL PROTECTED]
Sent: Sunday, November 14, 2004 11:33 PM
Subject: Re: syntax question..
Kalin,
Kalin thanks to all... yes, Rhino - i'm new. my first
Kalin post
VendorJobs.Industry = '2','3','4','5'Query failed: 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 '.Industry = '2','3','4','5''
at line 2
The first is the printout of my statement followed by
the mysql_error .
Here
On Sat, Nov 13, 2004 at 12:30:43PM -0800, Stuart Felenstein wrote:
$sql = SELECT PostStart, JobTitle, Industry,
LocationState, VendorID
FROM VendorJobs;
echo $sql;
//if ($Ind)
$sql .= WHERE VendorJobs.Industry = $s_Ind;
As you can see above s_ind is an array , comma
delimited.
--- Jim Winstead [EMAIL PROTECTED] wrote:
You can't compare a column with a comma-delimited
list of numbers like
that...
What should the seperator be then ?
Thank you
Stuart
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
On Sat, Nov 13, 2004 at 12:46:12PM -0800, Stuart Felenstein wrote:
--- Jim Winstead [EMAIL PROTECTED] wrote:
You can't compare a column with a comma-delimited
list of numbers like
that...
What should the seperator be then ?
My point was that you can't compare a column with an
--- Jim Winstead [EMAIL PROTECTED] wrote:
My point was that you can't compare a column with an
array
of numbers using the '=' operator. You have to use
the IN
operator, as in the line of code I posted:
Thank you Jim , it's working now!
Stuart
--
MySQL General Mailing List
For list
-Original Message-
From: David Blomstrom [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 10, 2004 4:08 PM
To: [EMAIL PROTECTED]
Subject: SQL Syntax Problem
$sql = 'SELECT
F.IDArea,
C.IDArea, C.Name, C.Pop, C.Nationality,
C.NationalityPlural, C.NationalityAdjective FROM
Think I found it. I made the changes with explanations of what I did.
If you have any further questions feel free to ask. Oh and this should
be on the list for others to see and maybe learn from
Respectfully,
Ligaya Turmelle
head[DATABASE CONNECTION]/head
body
div class=formdiv
--- Ligaya Turmelle [EMAIL PROTECTED] wrote:
Think I found it. I made the changes with
explanations of what I did.
If you have any further questions feel free to ask.
Oh and this should
be on the list for others to see and maybe learn
from
Wow, thanks so much for going to all that
I had a working query that suddenly doesn't work anymore.
It follows the syntax found in the documentation at
http://dev.mysql.com/doc/mysql/en/DELETE.html
specifically,
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id;
my query is:
DELETE FROM rsrc_linx_specialty USING
anymore.
It follows the syntax found in the documentation at
http://dev.mysql.com/doc/mysql/en/DELETE.html
specifically,
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id;
my query is:
DELETE FROM rsrc_linx_specialty USING rsrc_linx_specialty rls, rsrc_linx
rl, rsrc_linx_type
with this syntax didn't work, because the environment
didn't support it; chalk it up to 'human error' this time 'round. I
appreciate the quick reply.
Cameron
Did you upgrade to 4.0.17 or 4.1.7? In 4.1, you have to use the alias
between FROM and USING:
DELETE FROM rls USING rsrc_linx_specialty rls
This may be a purely PHP problem, but the error
message says SQL syntax. Check the manual that
corresponds to your MySQL server version...
More important, I haven't been able to find a solution
on any PHP forums. :)
This is the complete error message:
Failed to run SELECT F.IDArea, C.IDArea
It's not translating your vars to their respective values.
I didn't look to see why...
But MySQL doesn't know what
$_POST['order']
is.
David Blomstrom wrote:
This may be a purely PHP problem, but the error
message says SQL syntax. Check the manual that
corresponds to your MySQL server version
to their respective values.
I didn't look to see why...
But MySQL doesn't know what
$_POST['order']
is.
David Blomstrom wrote:
This may be a purely PHP problem, but the error
message says SQL syntax. Check the manual that
corresponds to your MySQL server version...
Failed to run SELECT F.IDArea
On Fri, 5 Nov 2004 17:49:29 -0500, Rhino [EMAIL PROTECTED] wrote:
I'm not sure why you want to use a subquery; if MySQL is anything like DB2,
a join usually performs better than a subquery and the optimizer converts a
subquery to a join (under the covers) whenever it can anyway. Therefore,
how
SELECT Syntax Help Needed!
On Fri, 5 Nov 2004 17:49:29 -0500, Rhino [EMAIL PROTECTED] wrote:
I'm not sure why you want to use a subquery; if MySQL is anything like
DB2,
a join usually performs better than a subquery and the optimizer converts
a
subquery to a join (under the covers) whenever
Hi!
I would love some help with my syntax (or another strategy). I keep bombing.
I've simplified it. Here is the deal:
Three files:
Main: id, name
Links1: id, linkname1 (a record may or may not exist for each record in
Main)
Links2: id, linkname2 (a record may or may not exist for each
main m right outer join links1 l1 on m.id = l1.id
right outer join links l2 on m.id = l2.id;
I haven't tested it but it ought to work.
Rhino
- Original Message -
From: Monique [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 05, 2004 4:59 PM
Subject: Advanced SELECT Syntax
select * from a join b on a.x = b.y;
works on mySQL 3.23.56 but doesn't work on mySQL 3.23.58.
I had to change it in
select * from a,b where a.x = b.y;
Is it a well-known behavior or is it a bit strange?
Thanks,
Marco
The join on syntax works on 3.23.56 but doesn't work on 3.23.58
Repeating
What do you mean, it doesn't work?
Michael
Marco wrote:
The query
select * from a join b on a.x = b.y;
works on mySQL 3.23.56 but doesn't work on mySQL 3.23.58.
I had to change it in
select * from a,b where a.x = b.y;
Is it a well-known behavior or is it a bit strange?
Thanks,
Marco
--
MySQL
alter table keywords change key_id page_id int(10) unsigned NOT NULL PK
auto_increment;
ERROR 1064 (42000): 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 'PK auto_increment' at line 1
I'm trying to change
At 12:12 -0400 9/23/04, leegold wrote:
alter table keywords change key_id page_id int(10) unsigned NOT NULL PK
auto_increment;
ERROR 1064 (42000): 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 'PK
On Thu, 23 Sep 2004 15:51:56 -0500, Paul DuBois [EMAIL PROTECTED] said:
At 12:12 -0400 9/23/04, leegold wrote:
alter table keywords change key_id page_id int(10) unsigned NOT NULL PK
auto_increment;
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual
is a red flag. I expect that you got too many results
and threw that in as a fix. It should be possible to get exactly what you
want, making that unneccesary. And I cannot imagine why you'd want to order
by userID.
Appreciate if someone can show me the right syntax.
Graham
Simplifying to keep
options_totals
LEFT JOIN options_names ON options_names.ID = options_totals.nameID
LEFT JOIN options ON options.ID = options_totals.optionID
LEFT JOIN users_options ON options_totals.optionID = users_options.optionID
WHERE userID 3
ORDER BY userID
Appreciate if someone can show me the right syntax
Hi, All:
I have a database which contains date attribute in string format
(like 2004-08-12). I want to genearte a report based on period time.
I use the syntax:
date1 ='2004-08-12'
date2='2004-08-18'
SELECT * FROM account WHERE (TO_DAYS(date) = TODAYS(date1)) and
(TO_DAYS(date) = TO_DAYS(date2
On Thu, 26 Aug 2004 11:31:46 -0500, Yong Wang [EMAIL PROTECTED] wrote:
I have a database which contains date attribute in string format
(like 2004-08-12). I want to genearte a report based on period time.
I use the syntax:
date1 ='2004-08-12'
date2='2004-08-18'
SELECT * FROM account
format
(like 2004-08-12). I want to genearte a report based on period time.
I use the syntax:
date1 ='2004-08-12'
date2='2004-08-18'
SELECT * FROM account WHERE (TO_DAYS(date) = TODAYS(date1)) and
(TO_DAYS(date) = TO_DAYS(date2));
The report script complains the condition after WHERE clause
administration.
--
I can't decide if this is my code, or the SQL syntax. Would it be possible,
based on this statement, to have pulled back duplicates from the same
record?
- Eve
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
Over 10 years of HTML experience. 2 years networking
administration.
--
I can't decide if this is my code, or the SQL syntax. Would it be possible,
based on this statement, to have pulled back duplicates from the same
record?
- Eve
--
MySQL General Mailing List
For list archives: http
You have a cartesian join because you do not have join criteria between the
resume and candidate tables.
-Original Message-
From: Eve Atley
To: [EMAIL PROTECTED]
Sent: 8/17/04 12:22 PM
Subject: Assistance with SQL syntax: pulling duplicates back
I think this is an easy question...I've
network php Over 10 years of HTML experience. 2 years
networking
administration.
--
I can't decide if this is my code, or the SQL syntax. Would it be
possible,
based on this statement, to have pulled back duplicates from the same
record?
- Eve
--
MySQL
if this is my code, or the SQL syntax. Would it be
possible,
based on this statement, to have pulled back duplicates from the same
record?
- Eve
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Eve,
Best to keep threads on the list. Others may have better ideas, and future
readers may benefit.
The comparison
candidate.Location IN ('CA', 'California')
will match 'CA' and 'California', but will not match 'Cupertino, CA' because
it isn't either of those strings. To match that row as
-Heinz Schulz; [EMAIL PROTECTED]
Subject: Re: SQL Syntax Question
- Original Message -
From: Karl-Heinz Schulz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 03, 2004 9:18 PM
Subject: SQL Syntax Question
I tried to get an answer on the PHP mailing list and I was told
Karl-Heinz Schulz wrote:
Thank you for trying to help me.
The output is wrong
I get either
Event 1
Event 2
Details 1 for event 1
Details 2 for event 1
Details 3 for event 1
that query is wrong :
$eventdetail_query = mysql_query(select informations, titles, file_name
from eventdetail, event where
]
Sent: Wednesday, August 04, 2004 5:52 AM
To: Karl-Heinz Schulz
Cc: [EMAIL PROTECTED]
Subject: Re: SQL Syntax Question
Karl-Heinz Schulz wrote:
Thank you for trying to help me.
The output is wrong
I get either
Event 1
Event 2
Details 1 for event 1
Details 2 for event 1
Details 3
- Original Message -
From: Karl-Heinz Schulz [EMAIL PROTECTED]
To: 'Philippe Poelvoorde' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 04, 2004 6:41 AM
Subject: RE: SQL Syntax Question
Philippe,
I changed my to the following but the result is now (I deleted
I tried to get an answer on the PHP mailing list and I was told that this
list would be quicker to get me a solution.
I have two tables Event and Eventdetails (structures dump can be found
at the end of the message).
I want to display all events and the related information from the
eventdetails
- Original Message -
From: Karl-Heinz Schulz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 03, 2004 9:18 PM
Subject: SQL Syntax Question
I tried to get an answer on the PHP mailing list and I was told that this
list would be quicker to get me a solution.
I have two
I have a question about the multiple table delete syntax. First the
documentation on the website is very clear. My question is why not how. The
'delete from using' is not ambiguous (to me). My question is about the form:
delete t1 from t1,t2 where ...
I would take this to mean remove matching
[EMAIL PROTECTED] wrote:
I have a question about the multiple table delete syntax. First the
documentation on the website is very clear. My question is why not how. The
'delete from using' is not ambiguous (to me). My question is about the form:
delete t1 from t1,t2 where ...
I would take
I have no problem understanding the syntax, or how to do what I want (at least
after my first mistake). It is more about if this is a consistant grammar. For
example, unix commands have the form verb src object, except for ln -s
(IMO).
From a lexical view, I do not think the two forms
Hi All,
I have noticed a lack of comments re Views.
Is it 5.0 or 5.1 that we will have Views capability?
I had hoped it was in the most up to date public development release of 5.
Unless I am getting the Views syntax wrong I assume its not there.
If it is not already packaged in V5.0
getting the Views syntax wrong I assume its not
there.
If it is not already packaged in V5.0 then will the syntax be the
standard SQL view syntax?
The online manual is your friend:
http://dev.mysql.com/doc/mysql/en/index.html
First hit for searching on views:
http://dev.mysql.com/doc/mysql
Un-named views are supposed to be there already. I know this is not the
real thing, I just thought I would mention it. ;-)
Cheers
Andrew.
- Original Message -
From: Josh Trutwin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 5:53 PM
Subject: Re: Views Syntax
Hi! The SQL's INSERT Syntax that have been frequently been used is
--snip--
INSERT INTO TABLE1
(COLUMN1,COLUMN2,COLUMN3,COLUMN4,COLUMN5)
VALUES
('ONE','TWO','THREE','FOUR','FIVE')
--snip--
where the TABLE1 have 5 columns, COLUMN1, COLUMN2, COLUMN3, COLUMN4,
COLUMN5. What I wanna know
Hi Scott,
Yes this will work. But, you the columns you are leaving out, must be auto fill or
allow blank/Null entries.
Scotty.
Original Message:
From: Scott Fletcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Questions about MySQL's INSERT syntax
Date: Thu, 17 Jun 2004 12:28:16
INSERT syntax
PM
:
Hi! The SQL's INSERT Syntax that have been
frequently been used is
--snip--
INSERT INTO TABLE1
(COLUMN1,COLUMN2,COLUMN3,COLUMN4,COLUMN5)
VALUES
('ONE','TWO','THREE','FOUR','FIVE')
--snip--
where the TABLE1 have 5 columns, COLUMN1, COLUMN2,
COLUMN3, COLUMN4,
COLUMN5. What I wanna
),
CONSTRAINT chk_loc CHECK (LOC in ('Loc1', 'Loc2', 'Loc3'));
And it says I have a syntax error. I've been through the manual and
can't spot what I've done wrong. Anyone?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL
(25),
CONSTRAINT fk_grp FOREIGN KEY (GROUP) REFERENCES GROUPS(GPNAME),
CONSTRAINT chk_loc CHECK (LOC in ('Loc1', 'Loc2', 'Loc3'));
And it says I have a syntax error. I've been through the manual and
can't spot what I've done wrong. Anyone?
I'm willing to bet that it's because DESC
) REFERENCES GROUPS(GPNAME),
CONSTRAINT chk_loc CHECK (LOC in ('Loc1', 'Loc2', 'Loc3'));
And it says I have a syntax error. I've been through the manual and
can't spot what I've done wrong. Anyone?
DESC is a reserved word. Best bet would be to choose a different name, but
if you must name
.
-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED]
Sent: 16 June 2004 16:43
To: eifion herbert (IAH-C)
Cc: [EMAIL PROTECTED]
Subject: Re: Create table syntax question
eifion herbert (IAH-C) wrote:
Hi,
Probably a very basic question.
I'm trying to a create
]
Subject: Re: Create table syntax question
eifion herbert (IAH-C) wrote:
Hi,
Probably a very basic question.
I'm trying to a create a table in mySQL 4.0.15 thus:
create table VACANCIES(
VACREF char(6) NOT NULL PRIMARY KEY,
TITLE varchar(60),
LOC varchar(9),
DESC text,
STARTDATE date,
GROUP
When I use this SQL statement, ...
--snip--
UPDATE BUSINESS_CATEGORY SET
(BUSINESS_CATEGORY.BUS_CAT,BUSINESS_CATEGORY.BUS_DESC) =
('JUNKKK','JUNK123KK') WHERE BUSINESS_CATEGORY.BUS_CAT_ID = '733788'
--snip--
I get the SQL syntax error saying,
--snip--
You have an error in your SQL syntax
From: Scott Fletcher [mailto:[EMAIL PROTECTED]
When I use this SQL statement, ...
--snip--
UPDATE BUSINESS_CATEGORY SET
(BUSINESS_CATEGORY.BUS_CAT,BUSINESS_CATEGORY.BUS_DESC) =
('JUNKKK','JUNK123KK') WHERE BUSINESS_CATEGORY.BUS_CAT_ID = '733788'
--snip--
I get the SQL syntax error
:
Fax to:
06/16/2004 04:08 Subject: MySQL -- SQL syntax
error
I want to do something like this:
delete from records where records.id in (select audit_log_records.id
from audit_log_records, audit_log where
audit_log.tracker_id=audit_log_records.tracker_id and
audit_log.operation='D');
--
MySQL General Mailing List
For list archives:
I created the dump file from my current DB to make adjustments and also migrate to
Innodb tables. In the process I have tried to add some ENUM types in select table.
Obviously, I am doing something wrong as each one give me a syntax error 1064 when I
try to source in the text file. I've read
to make adjustments and also migrate to Innodb tables. In the process I have tried to add some ENUM types in select table. Obviously, I am doing something wrong as each one give me a syntax error 1064 when I try to source in the text file. I've read the manual and do not see where my error is. Can
I'm running version 4.1.1-alpha. The 3 select statements below on the
following test table produce inconsitent results:
create table test (test varchar(20)) charset latin1 collate
latin1_general_cs;
insert into test values ('abcField1');
insert into test values ('abcField2');
insert into test
At 11:53 -0400 5/18/04, Matt Mastrangelo wrote:
I'm running version 4.1.1-alpha. The 3 select statements below on
the following test table produce inconsitent results:
create table test (test varchar(20)) charset latin1 collate latin1_general_cs;
insert into test values ('abcField1');
insert
, so they only executes
statements like insert into db.table values()
This behavior breaks replication when I use
mysqldump -h local -a -B db | mysql -h master
Yes, but the second syntax (with use db) should replicate if you use
replicate-do-db=db. I understood that you
the current
slaves that are configured to
replicate-wild-do-table=db.%
because there's no db.table syntax, so the slaves discard the insert.
Maybe adding
replicate-do-db=db (for all of my dbs) will do the trick?
sorry for replying to myself, but I verified that adding replicate-do-db=db
-h master
that works correctly on the new_server, but totally messes up the
current slaves that are configured to
replicate-wild-do-table=db.%
because there's no db.table syntax, so the slaves discard the insert.
Maybe adding
replicate-do-db=db (for all of my dbs
()
but this doesn't happen: the directive replicate-wild-do-table=db.% seems to
control the behaviour of the slaves, so they only executes statements like
insert into db.table values()
This behavior breaks replication when I use
mysqldump -h local -a -B db | mysql -h master
Yes, but the second syntax
local -a -B db | mysql -h master
Yes, but the second syntax (with use db) should replicate if you use
replicate-do-db=db. I understood that you tried it, and it didn't work ?
Exactly.
In my.cnf I have both:
replicate-do-db=db
replicate-wild-do-table=db.%
but only
insert into db.table
happen: the directive replicate-wild-do-table=db.% seems
to control the behaviour of the slaves, so they only executes statements
like insert into db.table values()
This behavior breaks replication when I use
mysqldump -h local -a -B db | mysql -h master
Yes, but the second syntax (with use
mysqldump -h local -a -B db | mysql -h master
Yes, but the second syntax (with use db) should replicate if you use
replicate-do-db=db. I understood that you tried it, and it didn't work ?
Exactly.
In my.cnf I have both:
replicate-do-db=db
replicate-wild-do-table=db.%
but only
()
This behavior breaks replication when I use
mysqldump -h local -a -B db | mysql -h master
Yes, but the second syntax (with use db) should replicate if you use
replicate-do-db=db. I understood that you tried it, and it didn't work ?
Exactly.
In my.cnf I have both:
replicate-do-db
Hi,
as the title says mysqldump 4.0.18 (and previous versions) doesn't want
to dump data in the format
insert into db.table values()
not even using -e or -a.
Is there any other cli switch that can do this?
Another question: is there a way to dump all dbs that DON'T match a
pattern without
Nico Sabbi [EMAIL PROTECTED] wrote:
Hi,
as the title says mysqldump 4.0.18 (and previous versions) doesn't want
to dump data in the format
insert into db.table values()
not even using -e or -a.
Is there any other cli switch that can do this?
No, but if you use -B option of mysqldump
from the
local server to the master I usually run
mysqldump -B db -h local | mysql -h master
that works correctly on the new_server, but totally messes up the current
slaves that are configured to
replicate-wild-do-table=db.%
because there's no db.table syntax, so the slaves discard
=db.%
because there's no db.table syntax, so the slaves discard the insert.
Maybe adding
replicate-do-db=db (for all of my dbs) will do the trick?
sorry for replying to myself, but I verified that adding replicate-do-db=db to
my.cnf doesn't work as I expected
--
MySQL General Mailing List
From: Eve Atley [mailto:[EMAIL PROTECTED]
Hi. I had a MySQL DB set up and recently added a field
'order' to allow for exceptions in a web site menu
heirarchy. Fields should be ordered by 'order' field
first where it does not contain 'NULL', and then by
field 'title'. I had this
; [EMAIL PROTECTED]
Subject: RE: Need correct 'order by' syntax where field does not contain
NULL
From: Eve Atley [mailto:[EMAIL PROTECTED]
Hi. I had a MySQL DB set up and recently added a field
'order' to allow for exceptions in a web site menu
heirarchy. Fields should be ordered by 'order' field
Mike Johnson wrote:
From: Eve Atley [mailto:[EMAIL PROTECTED]
Hi. I had a MySQL DB set up and recently added a field
'order' to allow for exceptions in a web site menu
heirarchy. Fields should be ordered by 'order' field
first where it does not contain 'NULL', and then by
field 'title'. I
Hi. I had a MySQL DB set up and recently added a field 'order' to allow for
exceptions in a web site menu heirarchy. Fields should be ordered by 'order'
field first where it does not contain 'NULL', and then by field 'title'. I
had this previously:
select * from navigation WHERE id =
select * from navigation WHERE id = '.$category.' AND active='y'
AND order IS NOT null
ORDER BY order, title
Hi. I had a MySQL DB set up and recently added a field 'order' to allow
for
exceptions in a web site menu heirarchy. Fields should be ordered by
'order'
field first where it does not
WHERE id = id = '$category.' AND active ='y' AND order is not NULL ORDER
by order,title
-Original Message-
From: Eve Atley [mailto:[EMAIL PROTECTED]
Sent: Monday, May 03, 2004 2:24 PM
To: [EMAIL PROTECTED]
Subject: Need correct 'order by' syntax where field does not contain
NULL
Is it possible to do something like this?
If(select * from xxx, if record found..update it, if record not found ..insert it)
Thanks,
Don
From: Don Dachner [mailto:[EMAIL PROTECTED]
Is it possible to do something like this?
If(select * from xxx, if record found..update it, if
record not found ..insert it)
Try the REPLACE INTO syntax:
http://dev.mysql.com/doc/mysql/en/REPLACE.html
--
Mike Johnson
Web Developer
Smarter
Apologies if this is an easy one, I'm stumped!
I'm having some trouble with syntax running MySQL from the command line.
I'm running MySQL 4.1.1-alpha from the OS X standard installer package on
a G5 running panther.
I have logged into MySQL as the root user, providing the correct password
At 15:42 -0700 4/21/04, cristopher pierson ewing wrote:
Apologies if this is an easy one, I'm stumped!
I'm having some trouble with syntax running MySQL from the command line.
I'm running MySQL 4.1.1-alpha from the OS X standard installer package on
a G5 running panther.
I have logged into MySQL
debug
Error in config file /etc/amavisd.conf: syntax error at
/etc/amavisd.conf line 829, near ' ORDER BY users.priority DESC ';
Here are the lines from my /etc/amavisd.conf file:
$sql_select_policy = 'SELECT *,users.vuid FROM users,policy_names'.
' WHERE (users.policy=policy_names.id
warwick mayson [EMAIL PROTECTED] wrote:
I am new to mysql and have a create script that when sourced throws a syntax error.
The script :
CREATE TABLE employee (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(id)
)
TYPE=InnoDB;
CREATE TABLE
hi
I am new to mysql and have a create script that when sourced throws a syntax error.
The script :
CREATE TABLE employee (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(id)
)
TYPE=InnoDB;
CREATE TABLE position (
id INTEGER UNSIGNED NOT NULL
Thanks a lot, I think I have enough to validate the syntax (sort of).
Ahmad Khashan
Michael Stassen [EMAIL PROTECTED] wrote:
Khashan wrote:
**None of these are table level modifiers**
Sorry, I guess I used the wrong terminology. I am aware of the table
options available. What I meant
Khashan wrote:
Thanks for the reply.
It seems like the syntax for create_table/create_definition
should have 2 part-2 modifiers
I think you are misreading the syntax. That is, I think you are confusing
the index-related create_definitions with the table_options.
1- one part-2 'column
:
Khashan wrote:
Thanks for the reply.
It seems like the syntax for create_table/create_definition
should have 2 part-2 modifiers
I think you are misreading the syntax. That is, I think you are confusing
the index-related create_definitions with the table_options.
1- one part-2 'column
Khashan wrote:
**None of these are table level modifiers**
Sorry, I guess I used the wrong terminology. I am aware of the table
options available. What I meant is additional definitions after the
columns have been defined.
Sorry I misunderstood you.
Now, do I understand that you are saying
I am looking at the syntax for creating table( section 6.5.3 of the manual):
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)]
[table_options] [select_statement]
and:
create_definition:
part-1 (- inserted by me for reference)
col_name type [NOT NULL | NULL
- Original Message -
From: Khashan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 1:04 PM
Subject: Create Table Syntax
I am looking at the syntax for creating table( section 6.5.3 of the
manual):
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
Thanks for the reply.
It seems like the syntax for create_table/create_definition
should have 2 part-2 modifiers
1- one part-2 'column' modifiers for the each column.
and
2- another part-2 table modifiers for the table as a whole ?
( at the end of column definitions).
two questions
301 - 400 of 991 matches
Mail list logo