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 listi
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 listings.cat3 =
23 )
Mike
- Original Message -
From: "Biz-comm"
To:
Sent:
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.lis
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 .
R
- Original Message -
> From: "Andrew Moore"
>
> 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 grenadyn
Is als
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 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 UserID
> pm1
You could make the column a unique key...that would prevent duplicates from
being entered. Then if you want to be able to try inserting duplicates (like
if you don't want the query to fail on duplicate attempts), you could do
INSERT IGNORE INTO myTable ...
Check http://www.mysql.com/doc/en/CREATE_
Add a UNIQUE INDEX to the table you are inserting to. You will then get
an error if you try to insert a second time with the same values.
Alternativly you could use perform a select and then an insert within
the same transaction, determining whether something exists in the db
before inserting. Th
If you wanted to use MyISAM tables and peform an initial select to
determine whether you should insert, you could lock the table you would
be selecting/insert from. 'LOCK TABLES table_name WRITE' Don't forget
to unlock the table when you are done 'UNLOCK TABLES', otherwise you
will likely have de
ALTER TABLE table_name DROP col_name
http://www.mysql.com/doc/en/ALTER_TABLE.html
So...
mysql> use hitcounter;
mysql> ALTER TABLE info DROP count;
Assuming info is the table name and count is the column you'd like to drop.
-Original Message-
From: Wileynet [mailto:[EMAIL PROTECTED]
Sent
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 FIEL
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 a F
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 d
> 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
>
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
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
> 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.
ailto:[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
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 L
> 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 prob
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
- 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
> frustra
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
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
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 tryi
25 matches
Mail list logo