On Tue, 22 Apr 2008, Sebastian Mendel wrote:
Sebastian Mendel schrieb:
Hiep Nguyen schrieb:
hi list,
reading manual on mysql regarding auto_increment with multiple-column
index:
CREATE TABLE animals (
grp ENUM('fish','mammal','bird') NOT NULL,
id MEDIUMINT NOT NULL AUTO_INCREMENT
hi list,
reading manual on mysql regarding auto_increment with multiple-column
index:
CREATE TABLE animals (
grp ENUM('fish','mammal','bird') NOT NULL,
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (grp,id)
);
INSERT INTO animals (grp,name) VALUES
hi all,
after a little 'research' and consultation with friends, i come up with
these tables for my database project.
table Item(ItemID,warehouse,ShapeID,weight,category,description)
table Shape(ShapeID,physical shape)
table Dimension(DimensionID,dimension)
table
On Wed, 16 Apr 2008, Daniel Brown wrote:
On Tue, Apr 15, 2008 at 9:03 AM, Hiep Nguyen [EMAIL PROTECTED] wrote:
hi all, i have an existing database (internal) with a user named 'admin',
everything works fine as far as privileges concern.
i just created a new database (test) and want to grant
hi all, i have an existing database (internal) with a user named 'admin',
everything works fine as far as privileges concern.
i just created a new database (test) and want to grant admin's privileges
on test as same as internal.
how do i do this???
i tried (as root):
grant all on test.* to
On Thu, 3 Apr 2008, Hiep Nguyen wrote:
hi all, i have a question on insert ... select statement.
tbl_1(fld1,fld2,fld3, )
fld1 int primary key auto_increment not null
tbl_2(fld_a,fld_b,fld_c,...)
how do i construct my select statement so that fld1 is auto increment?
insert into tbl_1
hi all, i have a question on insert ... select statement.
tbl_1(fld1,fld2,fld3, )
fld1 int primary key auto_increment not null
tbl_2(fld_a,fld_b,fld_c,...)
how do i construct my select statement so that fld1 is auto increment?
insert into tbl_1(fld1,fld2,fld3) select xxx, fld_b, NOW()
On Thu, 3 Apr 2008, Johan Höök wrote:
Hi Hiep,
you can put in either xxx = NULL
or you can skip it completely:
insert into tbl_1(fld2,fld3) select fld_b, NOW() from tbl_2;
Regards,
/Johan
Hiep Nguyen skrev:
hi all, i have a question on insert ... select statement.
tbl_1(fld1,fld2
hi all,
how do i select all fields in tbl1,tbl2, and only fld1,fld2 in tbl3?
is this possible???
select *,*,tbl3.fld1,tbl3.fld2 from tbl1,tbl2,tbl3;
the reason for this is b/c there are hundred of fields in tbl1 tbl2 that
i don't want to type them all.
thanks,
t. hiep
--
MySQL General
On Tue, 1 Apr 2008, Tim McDaniel wrote:
On Tue, 1 Apr 2008, Rob Wultsch [EMAIL PROTECTED] wrote:
On Tue, Apr 1, 2008 at 11:15 AM, Hiep Nguyen [EMAIL PROTECTED] wrote:
how do i select all fields in tbl1,tbl2, and only fld1,fld2 in tbl3?
select tbl2.*,
tbl1.*,
tbl3.fld1,
tbl3.fld2
from tbl1
i read about mysqlimport load data infile for mysql, but i can't find a
way to import text file using length of column, instead of delimiter
my text file contains fixed length column:
--
i can use ms excel to convert all files to .csv format and import, but it
would
hi all,
i come up these tables for my project and i'm looking for
advice/suggestion how to improve/optimize the structure further.
table item(itemid,warehouse,category,shapeid,)
table shape(shapeid,physical_shape,...)
table dimension(dimensionid,itemid,shapeid,characteristic,...)
hi all,
i have a table (not my design) with a lot of fields and users have access
to insert/update/delete record from this table. is there a way that mysql
can log all transactions who change what on this table??? or do i have to
create a seperate table to keep track the changes?
for
On Mon, 3 Mar 2008, Daniel Brown wrote:
On Mon, Mar 3, 2008 at 2:46 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:
mysql select user,host,password from mysql.user;
+--+--+--+
| user | host | password
On Tue, 4 Mar 2008, Dan Rogart wrote:
You should definitely consider getting rid of them, otherwise people can log
in to MySQL from any host with no credentials.
They are created during installation by the mysql_install_db script.
This tells you how to remove them:
where user = '' or password = '';
Those are the users you should consider dropping or assigning passwords to.
Hope that helps,
Dan
On 3/4/08 9:57 AM, Hiep Nguyen [EMAIL PROTECTED] wrote:
On Tue, 4 Mar 2008, Dan Rogart wrote:
You should definitely consider getting rid of them, otherwise people
hi all, i have a user that can only access localhost, how do i grant this
user permission so that can also be accessed from 192.168.1.50?
thanks
t. hiep
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
On Mon, 3 Mar 2008, Hiep Nguyen wrote:
hi all, i have a user that can only access localhost, how do i grant this
user permission so that can also be accessed from 192.168.1.50?
i got it. thanks
t. hiep
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
hi all, i just installed mysql and started mysqld.
it suggested i change pw for root, so i did:
mysqladmin -u root password my_pw;
but i can't do:
mysqladmin -u root -h dev.jss.com password my_pw;
how do i change pw for [EMAIL PROTECTED]
thanks,
t. hiep
--
MySQL General Mailing List
For list
On Mon, 3 Mar 2008, Daniel Brown wrote:
On Mon, Mar 3, 2008 at 2:01 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:
hi all, i just installed mysql and started mysqld.
it suggested i change pw for root, so i did:
mysqladmin -u root password my_pw;
but i can't do:
mysqladmin -u root -h
On Fri, 18 Jan 2008, Sebastian Mendel wrote:
Hiep Nguyen schrieb:
hi all,
i have a table looks like this:
ID sDate
1 1997-03-21
2 1997-04-30
3 1997-05-30
4 1998-01-29
5 1998-02-24
6 1998-03-21
7 1999-05-10
8 1999-07-12
9 1999-10-20
10 2000
hi all,
i have a table looks like this:
ID sDate
1 1997-03-21
2 1997-04-30
3 1997-05-30
4 1998-01-29
5 1998-02-24
6 1998-03-21
7 1999-05-10
8 1999-07-12
9 1999-10-20
10 2000-01-01
11 2000-02-15
12 2000-03-20
13 2000-05-18
how do
hi everyone,
i have a large ms excel data (text) file that i need to import to my table
in mysql. does any one have a suggestion how to do this? i'm try to
export to csv file, then import to my table, but i have so much problems
with delimeters
thanks
--
MySQL General Mailing List
For
hi list,
i have a loop to update my table:
update tbl_idea set col1 = 'text1', col2 = NOW() where ideaID = 1;
update tbl_idea set col1 = 'text2', col2 = NOW() where ideaID = 5;
...
update tbl_idea set col1 = 'textzzz', col2 = NOW() where ideaID = XXX;
my question is can i combine above
hi list,
i have two tables:
idea(iid int not null primary_key auto_increment,
completed_by int,
submitted_by int);
employee(eid int not null primary_key auto_increment,
first varchar(20),
last varchar(30));
table idea data:
1 | 4 | 10
2 | 3 | 7
table employee data:
3 | john | Doe
4
hi friends,
i searched on google but not file a solution.
is there a way that i can store special characters (return, new line, tab,
etc) into mysql (ver. 4.1.12) table with text type?
i use textarea tag for user to enter the text.
my goal is to store/display EXACTLY what user entered in
i asked this question before, but when i tried what D.Vin suggested, i got
an error.
mysql version is 4.1.12
i tried:
CREATE TABLE tbl_spdate(
spdate_ID int NOT NULL PRIMARY KEY AUTO_INCREMENT ,
spdate_date date NOT NULL ,
spdate_notes varchar( 100 ) ,
spdate_created timestamp default 0,
hi there,
this seems so easy, but i'm out of sql for a long time and need help
i have:
id,amount,state
1,2.00,il
2,2.00,oh
3,1.00,il
4,1.00,ks
5,3.00,ks
6,4.00,oh
how do i construct a sql statement that results as following:
il,3.0
oh,6.0
ks,4.0
sum (amount) all the same state.
thank
thanks,
T. Hiep
On Tue, 13 Nov 2007, Baron Schwartz wrote:
Hi,
Hiep Nguyen wrote:
hi there,
this seems so easy, but i'm out of sql for a long time and need help
i have:
id,amount,state
1,2.00,il
2,2.00,oh
3,1.00,il
4,1.00,ks
5,3.00,ks
6,4.00,oh
how do i construct a sql statement
hi there,
i have a text file that i prepare:
insert into `sa2007` (`id`,`amount`,`state`) values
('','1.00','oh'),
('','2.00','il'),
('','4.00','ks')
how do i import this file to sa2007 table from the command line? i tried
via phymyadmin, but it doesn't work (300 seconds timeout).
thnx,
T.
Hi list,
i tried to create a table with inserted lastupdated timestamp fields:
create table temp (
id int not null primary ke auto_increment,
data varchar(100),
inserted timestamp default now(),
lastupdated timestamp(8));
how do i get mysql to put in the current timestamp for inserted
, Olaf Stein [EMAIL PROTECTED] wrote:
I would use a trigger (at least for the update)
The first insert should work with now() and you can leave lastupdateted
empty
Olaf
On 9/4/07 3:01 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:
Hi list,
i tried to create a table with inserted lastupdated
to any
half-way reasonable database engine
but, as in all things IT, do whatever best meets your circumstances.
- michael
On 9/4/07, Hiep Nguyen [EMAIL PROTECTED] wrote:
is it possible to do without trigger?
i google and found this link:
http://sql-info.de/mysql/examples/CREATE-TABLE
Hi there,
we have warehouses all over U.S. and i just wonder what is the best way to
find out their timezone base on zipcode. Should i buy a database or is
there any function in mysql or php to get timezone base on a zipcode?
Thanks
T. Hiep
--
MySQL General Mailing List
For list
On Fri, 6 Jul 2007, David T. Ashley wrote:
On 7/6/07, Hiep Nguyen [EMAIL PROTECTED] wrote:
we have warehouses all over U.S. and i just wonder what is the best way to
find out their timezone base on zipcode. Should i buy a database or is
there any function in mysql or php to get timezone base
] www.nisc.coop
-Original Message-
From: Hiep Nguyen [mailto:[EMAIL PROTECTED]
Sent: Friday, July 06, 2007 10:51
To: David T. Ashley
Cc: mysql@lists.mysql.com
Subject: Re: zipcode to timezone
On Fri, 6 Jul 2007, David T. Ashley wrote:
On 7/6/07, Hiep Nguyen [EMAIL PROTECTED] wrote:
we have
: Mogens Melander [mailto:[EMAIL PROTECTED]
Sent: Monday, July 02, 2007 3:45 PM
To: mysql@lists.mysql.com
Subject: Re: database structure
On Mon, July 2, 2007 21:10, Hiep Nguyen wrote:
take your advice, i looked in to JOIN and i got the idea. but i noticed
that in order to use JOIN, don't you
Hi all,
i'm seeking for help/suggestion on how to create relationship for this
scenario:
I have one table (tag) with the following fields:
tagid, location, weight, grade, heat, shape, diameter, length, width,
height, ... (and many other fields)
what i want to do is move the shape field
is this list working? my last post failed? re-try.
T. Hiep
-- Forwarded message --
Date: Mon, 2 Jul 2007 05:53:17 -0700 (PDT)
From: Hiep Nguyen [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: database structure
Hi all,
i'm seeking for help/suggestion on how to create
- Experts in Healthcare Learning
(516) 478-4100, x105
[EMAIL PROTECTED]
-Original Message-
From: Hiep Nguyen [mailto:[EMAIL PROTECTED]
Sent: Monday, July 02, 2007 8:53 AM
To: mysql@lists.mysql.com
Subject: database structure
Hi all,
i'm seeking for help/suggestion on how to create
]
-Original Message-
From: Hiep Nguyen [mailto:[EMAIL PROTECTED] Sent: Monday, July 02, 2007 8:53
AM
To: mysql@lists.mysql.com
Subject: database structure
Hi all,
i'm seeking for help/suggestion on how to create relationship for this
scenario:
I have one table (tag) with the following fields:
tagid
would select data from these tables by using JOIN's. A bit difficult to
grasp if you're an absolute beginner, but you'll never want to go back
afterwards.
Greetz,
boro
Hiep Nguyen schreef:
On Mon, 2 Jul 2007, Borokov Smith wrote:
Or:
Tag
ShapeDimension (type enum('height', 'thickness', etc
i believe date is a reserved word for mysql. don't use reserved word for
the column name. it's confused.
On Tue, 20 Mar 2007, Peter wrote:
Hello,
I have a a large a table which a field called date, type date.
When I select a smaller range e.g 3 months system uses the index 'date'.
That
select * from table where . limit 1
that would do it if you don't care which one it returns
JC
On Tue, 12 Sep 2006, Brian Dunning wrote:
I'm searching a database of geopoints, and when two records have the
same latitude and longitude, I only want to return one of them -
basically
44 matches
Mail list logo