Am 02.01.2012 16:33, schrieb Biz-comm:
Thanks for any assistance.
Web page that needs a sort of all records with a specific state, set to
show, and if it exists in one of 4 categories.
Using this:
SELECT *
FROM listings
WHERE listing_state = 'DC'
AND listings.listing_show
-comm.com
To: mysql@lists.mysql.com
Sent: Monday, January 02, 2012 10:33 AM
Subject: Beginner question
Thanks for any assistance.
Web page that needs a sort of all records with a specific state, set to
show, and if it exists in one of 4 categories.
Using this:
SELECT *
FROM listings
WHERE
Perfect. Thanks so much.
On Jan 2, 2012, at 10:40 AM, Mike OK wrote:
Hi Patrice
I would try some brackets.
Something like this should work
SELECT * FROM listings WHERE listing_state = 'DC' AND listings.listing_show
='y' AND ( listings.cat1 = 23 OR listings.cat2 = 23 OR
Hey, welcome to the lists,
Be mindful that your query is using 2 tables and 'SELECT *'.
On Tue, Oct 11, 2011 at 4:11 PM, Biz-comm b...@biz-comm.com wrote:
I am trying to write a query for a web page that shows a list of users in a
particular group.
There are 3 tables:
pm1_users that uses
- Original Message -
From: Andrew Moore eroomy...@gmail.com
Be mindful that your query is using 2 tables and 'SELECT *'.
Which probably means not so much to someone who doesn't even know what a join
is :-)
Have a look at http://www.w3schools.com/sql/sql_join.asp .
--
Bier met
Thanks for the pointer. Digging out reference books to learn how to do a join.
:-)
On Oct 11, 2011, at 11:23 AM, Johan De Meersman wrote:
Which probably means not so much to someone who doesn't even know what a join
is :-)
Have a look at http://www.w3schools.com/sql/sql_join.asp .
Having duplicates is not a problem.
As long as you don't have a UNIQUE index on it.
Something else is happening in your code that is putting out the HTML I
would guess.
P.S. It should be SELECT * FROM jspCart_products;
(your table, not your database)
B Wiley Snyder wrote:
Hello, hope this is
- Original Message -
From: B Wiley Snyder [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 1:56 AM
Subject: mySQL beginner question
Hello, hope this is the right list
I created a table with the following code
CREATE TABLE jspCart_products (
ProductID
Hello, hope this is the right list
I created a table with the following code
CREATE TABLE jspCart_products (
ProductID int primary key,
CategoryID int,
ModelNumber varChar(75),
ModelName varChar(250),
ProductImage varchar(250),
UnitCost decimal(9,2),
Description BLOB,
);
The CategoryID has
Marty Ray [EMAIL PROTECTED] wrote:
Brace yourself for another beginner question...
When I try to use the SHOW command (logged in as root) , I get an error:
mysql show databases;
ERROR:
No query specified
What version of MySQL do you use? What OS?
There is a bug on Mac OS X in MySQL
Brace yourself for another beginner question...
When I try to use the SHOW command (logged in as root) , I get an error:
mysql show databases;
ERROR:
No query specified
Any suggestions?
Thanks!
Marty Ray
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Hi --
I'm still relatively new to MySql.
I'm using InnoDB tables and foreign keys.
When I set up the databases, I recall assigning
a few large fixed-size files to the InnoDB engine for
data (and I think) logs.
I've been adding data to my databases daily and wish
to know how full they are, and
Tofu Optimist wrote:
When I set up the databases, I recall assigning
a few large fixed-size files to the InnoDB engine for
data (and I think) logs.
I've been adding data to my databases daily and wish
to know how full they are,
Use this command:
show table status from database_name like
/CREATE_TABLE.html and
http://www.mysql.com/doc/en/ALTER_TABLE.html for information about keys.
-Brian McCain
- Original Message -
From: Wileynet [EMAIL PROTECTED]
To: 'mysql users' [EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 3:03 PM
Subject: Beginner question - Preventing Duplicate Entries
Is there a sql statement that would not allow the same entry twice.
Something like INSERT into myTable s WHERE s != Value(?). I dont know
if that makes sense but I thought I would give it a shot.
Basically I want to know if it is possible and if so can you point me to
a webpage or give me an
deadlocks.
~Wynne
-Original Message-
From: Wileynet [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 2:04 PM
To: 'mysql users'
Subject: Beginner question - Preventing Duplicate Entries
Is there a sql statement that would not allow the same entry twice.
Something like INSERT
. This of course would require transactions supported
by InnoDB tables and not supported by MyISAM.
~Wynne
-Original Message-
From: Wileynet [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 2:04 PM
To: 'mysql users'
Subject: Beginner question - Preventing Duplicate Entries
I have looked everywhere online, books.
I simply would like to DELETE a FIELD from the command line.
I have a database called hitcounter.
Inside hitcounter I have one table with 3 fields.
I've tried...
DELETE FROM info FIELD count;
ALTER info DELETE count;
DROP count;
Can someone please tell me
USE hitcounter;
ALTER TABLE info DROP count;
Hope this helps
Roger
-Original Message-
From: Wileynet [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 8:27 PM
To: [EMAIL PROTECTED]
Subject: BEGINNER QUESTION.
I have looked everywhere online, books.
I simply would like to DELETE
You were so close...
ALTER info DROP count;
-Brian McCain
- Original Message -
From: Wileynet [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 5:26 PM
Subject: BEGINNER QUESTION.
I have looked everywhere online, books.
I simply would like to DELETE a FIELD from
: Monday, March 24, 2003 5:27 PM
To: [EMAIL PROTECTED]
Subject: BEGINNER QUESTION.
I have looked everywhere online, books.
I simply would like to DELETE a FIELD from the command line.
I have a database called hitcounter.
Inside hitcounter I have one table with 3 fields.
I've tried...
DELETE FROM
At 08:33 PM 2/16/2002 , you wrote:
Hello
I am new to the subject. I am experimenting in mysql via PHP with a nice
book (PHP and MySQL
Web development). My question is how many queries to mysql, made via PHP,
should considered
ok for efficiency. I know it has much to do with the size of
Hello
I am new to the subject. I am experimenting in mysql via PHP with a nice
book (PHP and MySQL
Web development). My question is how many queries to mysql, made via
PHP, should considered
ok for efficiency. I know it has much to do with the size of databases,
but I would like to get an
I am new to the subject. I am experimenting in mysql via PHP with a nice
book (PHP and MySQL
Web development). My question is how many queries to mysql, made via
PHP, should considered
ok for efficiency. I know it has much to do with the size of databases,
but I would like to get an
idea.
Assuming that you have a table called 'test' where there are three columns
'a', 'b' and 'c'.
Now you have 'a'+'b' as unique but neither only 'a' nor 'b'.
To specify that, define a and b both combined as primary key for the table,
as in the following statement:
CREATE TABLE `test` (
`a` TINYINT
When creating a table, can we specify that the combinaison of two fields
needs to be unique but each of those two fields may have duplicates,
just not both the same?
Can we have a required attribute on one of two fields? I have
phone_line_french and phone_line_english, i require one of those two
Hello!
I am working on my first MySQL client. I have a number of tables, each
containing a AUTO_INCREMENT PRIMARY KEY column. The client is built in
Java and using a JDBC-bridge to connect to the database.
When I do an insert in one of these tables the primary key column gets a
new ID. How do I
Anna Åhnberg writes:
When I do an insert in one of these tables the primary key column gets a
new ID. How do I get this ID? I guess I cannot use SELECT MAX(id)
FROM Table since old, deleted id's are reused for new rows.
Please, help me!
I shall help you help yourself, for from that
The manual has all the necessary information:
http://www.mysql.com/doc/C/R/CREATE_TABLE.html
http://www.mysql.com/doc/e/x/example-AUTO_INCREMENT.html
The unofficial FAQ has a chapter on AUTO_INCREMENT:
http://www.bitbybit.dk/mysqlfaq/faq.html#ch6_0_0
What you're looking for is probably
Anna Åhnberg writes:
Thanks, I actually already found the chapters but now I also now how to
use the function too!
Let me quote from the manual:
LAST_INSERT_ID([expr])
Returns the last automatically generated value that was
inserted into an AUTO_INCREMENT column.
mysql select
:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 10:41 AM
To: [EMAIL PROTECTED]
Subject:Re: Beginner question - getting last inserted ID
Anna Åhnberg writes:
Thanks, I actually already found the chapters
Anna Åhnberg writes:
Thanks, I actually already found the chapters but now I also now how to
use the function too!
Let me quote from the manual:
LAST_INSERT_ID([expr])
Returns the last automatically generated value that was
inserted into an AUTO_INCREMENT column.
mysql
On Fri, 9 Nov 2001, Carl Troein wrote:
Date: Fri, 09 Nov 2001 15:41:21 GMT
From: Carl Troein [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Beginner question - getting last inserted ID
Anna Åhnberg writes:
Thanks, I actually already found the chapters but now I also now how
- Original Message -
From: jim barchuk [EMAIL PROTECTED]
With luck you got the book at a reputable dealer who'll allow you to
exchange it for Paul Dubois _MySQL_ New Riders ISBN0-7357-0921-1. Please
spend a few extra $ and save yourself many many hours of confusion and
frustration.
Hello Marshall,
Saturday, June 09, 2001, 9:05:18 AM, you wrote:
MB I'm a new user, working through the tutorial provided in the MySQL documentation
(chapter 9). I'm trying to load the data from the pet.txt file into the pet table
using the specified command:
MB mysql load data local infile
At 1:05 AM -0500 6/9/01, Marshall Bohlin wrote:
I'm a new user, working through the tutorial provided in the MySQL
documentation (chapter 9). I'm trying to load the data from the
pet.txt file into the pet table using the specified command: mysql
load data local infile pet.txt into table pet;
I'm a new user, working through the tutorial provided in the MySQL documentation
(chapter 9). I'm trying to load the data from the pet.txt file into the pet table
using the specified command: mysql load data local infile pet.txt into table pet;
I get the following:
ERROR:
File 'pet.txt' not
Not sure what the load data local infile thing is, but I always
load text files from the command line like this (on Red Hat linux):
% mysql -u some_guy -p some_db /full/path/to/file.txt
I'm a new user, working through the tutorial provided in the MySQL
documentation (chapter 9). I'm trying
I am brand new to MySQL - my web host has set up a graphical tool for me to
use, to try and administer it - it's called MysqlTool, Version 0.85. It's
got a database there that my host created for me. Now I want to create an
additional database, but don't see any kind of button for doing that.
-Original Message-
From: Savin, Jill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 12:27 PM
To: [EMAIL PROTECTED]
Subject: Basic Beginner Question
I am brand new to MySQL - my web host has set up a graphical tool for me to
use, to try and administer it - it's called MysqlTool, Version
let you
create multiple databases, you have to stash all your tables in one big
database.
Cheers
Jon
-Original Message-
From: Savin, Jill [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 17:27
To: [EMAIL PROTECTED]
Subject: Basic Beginner Question
I am brand new to MySQL - my web host has
41 matches
Mail list logo