How To Pass a Collection/List/Map Through the iBatis to the Database?

2005-09-14 Thread Caroline Jen
I am currenly using JSF as the front end of a J2EE application. Data go through many business logic layers and reach the database through the iBatis. The iBatis is new to me. To pass a query String from the front end to the database and get a Collection back from the database through the iBatis

What Is LIMIT? and How to Use LIMIT?

2004-04-01 Thread Caroline Jen
I saw somebody has MySQL statement this way: StringBuffer sql = new StringBuffer(512); sql.append(SELECT ThreadID, ForumID, MemberName, LastPostMemberName, ThreadTopic, ThreadBody); sql.append( FROM + TABLE_NAME); sql.append( ORDER BY + sort + + order);

How To Write This SQL Statement

2004-02-17 Thread Caroline Jen
Please help. What is the syntax of idenfying those who do not have addresses (in the address field) in the database? __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html -- MySQL General Mailing List For

Multiple Roles

2004-01-02 Thread Caroline Jen
In case that a user has multiple roles; for example, John Dole is both author and editor, 1. I should have two rows for John Dole? John Dole author John Dole editor or. I should have only one row and use comma ',' to separate the roles? John Dole author, editor 2.

Primary Key

2004-01-01 Thread Caroline Jen
I saw an example of creating tables (see below). I wonder what the primary key (user_name, role_name) in the table user_roles means? Does it mean that both user_name and role_name are the primary key of the user_roles table? How does a table have two primary keys? create table users (

Problem With Creating Table

2003-12-31 Thread Caroline Jen
Hi, I tried to create a table. This table has seventeen fields. My create table syntax gets too long and I was only able to specify 5 fields at the mysql prompt in the DOS window (DOS does not accept a command beyond certain length). How do I put the rest 12 fields in the table I just created?

Create Tables In MySQL

2003-12-30 Thread Caroline Jen
Hi, I have several simple questions regarding creating tables in the MySQL. 1. For a variable of Java primitive int type, I should use INT or INTEGER? Do I have to specify the length of the field? CREATE TABLE message_thread( thread_id INT or INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY); 2. A

How Do I Insert ...... ?

2003-12-25 Thread Caroline Jen
I have a table 'message' in the MySQL database. To make it simple; say, I have three fields in that table: thread_ID, thread_topic, and thread_body. The thread_ID field is AUTO_INCREMENT; therefore, I do not insert any value into that column. The value of that field starts with 1 when the first

IDENTITY column

2003-12-23 Thread Caroline Jen
Hi, I am a beginner in using database. And I appreciate your support and help. When we first create a table, 1. is it possible to create a column that identifies each record that is to be inserted? 2. If we can create this IDENTITY column, how do we create it? Do we set a maximum to the

Is It Possible To Change the Value of A Particular Field Manually?

2003-12-17 Thread Caroline Jen
Hi, I am not a database person. I have a database called members. One of the fields in this database is user_name. There are a number of records in this database. Under the field user_name, I would like to make some changes manually; for example, I want to change John Doe to john_doe

How To Delete A Particular Record From a Table?

2003-12-01 Thread Caroline Jen
Hi, I am new in using database. I have created a table in a MySQL database. I want to delete a record from the members table. The record I want to delete is: user_name=John Smith. I tried: MySQLdelete John Smith from members; it does not work. MySQLdelete username='John Smith' from members;

Select Records From the Database

2003-12-01 Thread Caroline Jen
I got null after selecting records from a table in the database. The table is created by me. I know how many records will be selected. Just cannot be null. I cannot help wonder if my SELECT statement is correct - I want records to be selected if user_role is equal to the userrole I supplied

How To Create An ArrayList From the MySQL database

2003-11-27 Thread Caroline Jen
I have a table members in the MySQL database. I am going to supply a String editor and search the members table. All those who are editor will be picked up and their name will enter the array I want to create. How do I code it and return this array? Here is a sketch of my code. I do not have

Conditional Search of the Database

2003-10-30 Thread Caroline Jen
I am learning to query the MySQL database artimus_article. My database is a storage of articles with name of the creator, title of the article, the category in which the article is classifies, , etc. I try to search articles by the name of the creator within the computer science category.

How To Create Users In MySQL?

2003-09-10 Thread Caroline Jen
I have the MySQL-3.23.55 installed in my PC. Therefore, I am the DBA without the required DBA knowledge. First, how do I create users in the MySQL database? Second, how do I grant table creation privilege to users? Is GRANT ALL PRIVILEGES ON databasename TO someuser IDENTIFIED BY 'somepassword';