MySQLdb syntax issues - HELP

L

Luke

Im very new to SQL in general, let alone coding it into python. I can
interact with a MySQL database just fine for the most part, but im running
into some problems here... This is the function in my script that keeps
raising errors:

-------------------------------------------------

def NewChar():
""" NewChar() -
Call this function to begin new character generation.

At this time it is the only function you need to call from the
NewCharacter module.

It takes no arguments.

"""
CharAccount = NewAccount()
CharName = raw_input("Enter New Characters Name: \n")
CharGender = NewGender()
CharJob = NewJob()
CharLevel = "1"
Attributes = GetAtt() ###--- imports the attributes to be added to
character info
Strength = Attributes[0]
Dexterity = Attributes[1]
Inteligence = Attributes[2]
Charm = Attributes[3]
Luck = Attributes[4]

###--- This will print the results to a script that will be used to
store
###--- and retrieve character data for use in the game. It will
eventually
###--- be phased out by a database or encrypted file and calling scripts
so
###--- it wont be accessable by the user.
#AppendChar = '\n["' + CharName + '", "' + CharGender + '", "' + CharJob
+ '", ' + CharLevel + ', ' + Strength + ', ' + Dexterity + ', ' +
Inteligence + ', ' + Charm + ', ' + Luck + ']'

#CharSheet = "Character.hro"
#CharOutput = open(CharSheet, 'a', 5000)
#CharOutput.writelines(AppendChar)
#CharOutput.close()


###--- MySQL implementation of the new character save.
conn = MySQLdb.connect(host = 'localhost', user = 'hero', passwd
= 'password', db = 'hero')
cursor = conn.cursor()

cursor.execute("""
CREATE TABLE %s
(
name CHAR(40),
gender CHAR(40),
job CHAR(40),
level TEXT,
str TEXT,
dex TEXT,
intel TEXT,
cha TEXT,
luc TEXT
)
""" % CharAccount)

CharInfo = (CharAccount, CharName, CharGender, CharJob, CharLevel,
Strength, Dexterity, Inteligence, Charm, Luck)

cursor.execute("""
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s)
""", (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,
Dexterity, Inteligence, Charm, Luck))

cursor.execute("SELECT name, job FROM %s" % CharAccount)
while (1):
row = cursor.fetchone()
if row == None:
break
print "\n \n \n You just created: %s \n Job class is: %s" % (row[0],
row[1])

cursor.close()
conn.commit()
conn.close()

print "\n \n \n Your character is made!"

MakeAgain = raw_input("\n \n \n Would you like to make another character
while we are at it? (y, n): \n")
MakeAgain = MakeAgain.lower()
MakeAgain = MakeAgain[0]
if MakeAgain == "y":
NewChar()
else:
return

-------------------------------------------------------

The part that keeps getting me errors is:

-------------------------------------------------------

cursor.execute("""
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s)
""", (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,
Dexterity, Inteligence, Charm, Luck))

-------------------------------------------------------

i have tried various ways to do this string insertion, and i keep getting
errors. it seems that MySQLdb doesnt like me assigning a string to the
table name if im going to assign more to values... I have reworked the last
line so many times its pathetic and have seen about 3 or 4 different
errors, but they are almost all being raised by the same functions within
the MySQLdb code. All variables i am attempting to assign are in string
form and have worked in a test script i made that does everything the same
except substituting the strings within my query. Ive been stuck on this all
week and have read numerous tutorials, the DB-API specification sheet, the
MySQL manual, the MySQLdb documentation, and a few books... none of which
seem to adress my problem since they are all only assigning variables to
the table name OR the values of the query, not both. Please help me figure
this out.
 
B

Bruno Desthuilliers

Luke a écrit :
Im very new to SQL in general, let alone coding it into python. I can
interact with a MySQL database just fine for the most part, but im running
into some problems here... (snip)

-------------------------------------------------

def NewChar():
""" NewChar() -
Call this function to begin new character generation.

At this time it is the only function you need to call from the
NewCharacter module.

It takes no arguments.

"""
CharAccount = NewAccount() (snip)


cursor.execute("""
CREATE TABLE %s
(
name CHAR(40),
gender CHAR(40),
job CHAR(40),
level TEXT,
str TEXT,
dex TEXT,
intel TEXT,
cha TEXT,
luc TEXT
)
""" % CharAccount)

Err... Are you sure you want a new table here ?
CharInfo = (CharAccount, CharName, CharGender, CharJob, CharLevel,
Strength, Dexterity, Inteligence, Charm, Luck)

cursor.execute("""
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s)
""", (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,
Dexterity, Inteligence, Charm, Luck))
(snip)
The part that keeps getting me errors is:

-------------------------------------------------------

cursor.execute("""
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s)
""", (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,
Dexterity, Inteligence, Charm, Luck))

-------------------------------------------------------

i have tried various ways to do this string insertion, and i keep getting
errors. it seems that MySQLdb doesnt like me assigning a string to the
table name if im going to assign more to values...

Your problem comes from confusion between Python's string formating
system and db-api query arguments system - which sometimes (as here) use
the same placeholder mark.

What you want here is:

sql = """
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES (%%s, %%s, %%s, %%s, %%s, %%s, %%s, %%s, %%s)
""" % CharAccount

cursor.execute(sql, (CharName, CharGender, CharJob, CharLevel,
Strength, Dexterity, Inteligence, Charm, Luck))
 
W

wes

Luke said:
Im very new to SQL in general, let alone coding it into python. I can
interact with a MySQL database just fine for the most part, but im running
into some problems here... This is the function in my script that keeps
raising errors:

-------------------------------------------------

def NewChar():
""" NewChar() -
Call this function to begin new character generation.

At this time it is the only function you need to call from the
NewCharacter module.

It takes no arguments.

"""
CharAccount = NewAccount()
CharName = raw_input("Enter New Characters Name: \n")
CharGender = NewGender()
CharJob = NewJob()
CharLevel = "1"
Attributes = GetAtt() ###--- imports the attributes to be added to
character info
Strength = Attributes[0]
Dexterity = Attributes[1]
Inteligence = Attributes[2]
Charm = Attributes[3]
Luck = Attributes[4]

###--- This will print the results to a script that will be used to
store
###--- and retrieve character data for use in the game. It will
eventually
###--- be phased out by a database or encrypted file and calling scripts
so
###--- it wont be accessable by the user.
#AppendChar = '\n["' + CharName + '", "' + CharGender + '", "' + CharJob
+ '", ' + CharLevel + ', ' + Strength + ', ' + Dexterity + ', ' +
Inteligence + ', ' + Charm + ', ' + Luck + ']'

#CharSheet = "Character.hro"
#CharOutput = open(CharSheet, 'a', 5000)
#CharOutput.writelines(AppendChar)
#CharOutput.close()


###--- MySQL implementation of the new character save.
conn = MySQLdb.connect(host = 'localhost', user = 'hero', passwd
= 'password', db = 'hero')
cursor = conn.cursor()

cursor.execute("""
CREATE TABLE %s
(
name CHAR(40),
gender CHAR(40),
job CHAR(40),
level TEXT,
str TEXT,
dex TEXT,
intel TEXT,
cha TEXT,
luc TEXT
)
""" % CharAccount)

CharInfo = (CharAccount, CharName, CharGender, CharJob, CharLevel,
Strength, Dexterity, Inteligence, Charm, Luck)

cursor.execute("""
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s)
""", (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,
Dexterity, Inteligence, Charm, Luck))

cursor.execute("SELECT name, job FROM %s" % CharAccount)
while (1):
row = cursor.fetchone()
if row == None:
break
print "\n \n \n You just created: %s \n Job class is: %s" % (row[0],
row[1])

cursor.close()
conn.commit()
conn.close()

print "\n \n \n Your character is made!"

MakeAgain = raw_input("\n \n \n Would you like to make another character
while we are at it? (y, n): \n")
MakeAgain = MakeAgain.lower()
MakeAgain = MakeAgain[0]
if MakeAgain == "y":
NewChar()
else:
return

-------------------------------------------------------

The part that keeps getting me errors is:

-------------------------------------------------------

cursor.execute("""
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s)
""", (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,
Dexterity, Inteligence, Charm, Luck))

-------------------------------------------------------

i have tried various ways to do this string insertion, and i keep getting
errors. it seems that MySQLdb doesnt like me assigning a string to the
table name if im going to assign more to values... I have reworked the last
line so many times its pathetic and have seen about 3 or 4 different
errors, but they are almost all being raised by the same functions within
the MySQLdb code. All variables i am attempting to assign are in string
form and have worked in a test script i made that does everything the same
except substituting the strings within my query. Ive been stuck on this all
week and have read numerous tutorials, the DB-API specification sheet, the
MySQL manual, the MySQLdb documentation, and a few books... none of which
seem to adress my problem since they are all only assigning variables to
the table name OR the values of the query, not both. Please help me figure
this out.

Luke,
It would be most helpful if you assigned the sql to
a string, printed the string, executed the string, and
posted the error message.

sql = "INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc) VALUES \
(%s, %s, %s, %s, %s, %s, %s, %s, %s) \
" % (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,\
Dexterity, Inteligence, Charm, Luck)

print "sql=",sql
cursor.execute(sql)

-then show the error message here

wes
 
L

Luke

Bruno said:
Luke a écrit : (snip)

Err... Are you sure you want a new table here ?
(snip)

yes, thats the easier way i can think of for now since i am so new to SQL,
eventually im sure i will put all the characters into one larger table
though... but for now i just dont feal like figuring out how to scan the
table for the records i need based on name of character... ill save that
for later. (unless there is a very easy way to do it that doesnt require
re)

(snip)
Your problem comes from confusion between Python's string formating
system and db-api query arguments system - which sometimes (as here) use
the same placeholder mark.

What you want here is:

sql = """
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES (%%s, %%s, %%s, %%s, %%s, %%s, %%s, %%s, %%s)
""" % CharAccount

cursor.execute(sql, (CharName, CharGender, CharJob, CharLevel,
Strength, Dexterity, Inteligence, Charm, Luck))

wow, i was so focused on learning the MySQLdb module i have been overlooking
simply escaping my % signs the whole time... nice catch, thanks alot. it
works like a charm now.


PROBLEM SOLVED, BUT IF YOU WANT TO ADD ANYTHING, FEEL FREE...
 
J

John Machin

Bruno said:
Luke a écrit : (snip)
cursor.execute("""
CREATE TABLE %s
(
name CHAR(40), [snip]
luc TEXT
)
""" % CharAccount)
Err... Are you sure you want a new table here ?

(snip)

yes, thats the easier way i can think of for now since i am so new to SQL,
eventually im sure i will put all the characters into one larger table
though... but for now i just dont feal like figuring out how to scan the
table for the records i need based on name of character...

Have you figured out how to scan a list of table names for the records
you need? Where will you keep that list -- in another table? in a
file? hard-coded in your scripts?
ill save that
for later. (unless there is a very easy way to do it that doesnt require
re)

If you have one table (as you should) called (say) "character", with
the primary key column called (say) "characcount", you can find one
exact match like this:
SELECT * FROM character WHERE characcount = 'Ronin88'
or do a wild-card search like this:
SELECT * FROM character WHERE characcount LIKE 'Ron%'
[I'm presuming that's what you mean by your reference to 're']

HTH,
John
 
G

Gabriel Genellina

Bruno Desthuilliers wrote:

yes, thats the easier way i can think of for now since i am so new to SQL,
eventually im sure i will put all the characters into one larger table
though... but for now i just dont feal like figuring out how to scan the
table for the records i need based on name of character... ill save that
for later. (unless there is a very easy way to do it that doesnt require
re)

re???? No. Just plain SQL, see below. As you wouldn't -in general-
define a new class for each character, the same happens for the
tables: you wouldn't create a new table for each character, as they
all share the same set of attributes; just insert a new *row* of data
into the table. BTW, it's similar to what you appear to be doing
previously: appending a new row to Character.hro file, conceptually
it's the same thing.
Table names and column names are usually known when you define the
application and remain fixed. And they can't be provided as parameters
in the execute method: that's why Bruno split it in two steps,
building a sql statement first (with the table name in it) and then
executing it with the remaining parameters.
So, I would create the table ONCE, with name Character, and a new
column Account.

To insert a new character:
sql = """
INSERT INTO Character (account, name, gender, job, level, str, dex,
intel, cha, luc)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"""
cursor.execute(sql, (CharAccount, CharName, CharGender, CharJob,
CharLevel,
Strength, Dexterity, Inteligence, Charm, Luck))

Retrieving a certain character is not harder:
sql = """
SELECT name, gender, job, level, str, dex, intel, cha, luc
FROM Character
WHERE account = %s"""
cursor.execute(sql, (CharAccount,))
CharName, CharGender, CharJob, CharLevel, Strength, Dexterity,
Inteligence, Charm, Luck = cursor.fetchone()
 
D

Dennis Lee Bieber

CharAccount = NewAccount()
CharName = raw_input("Enter New Characters Name: \n")
CharGender = NewGender()
CharJob = NewJob()
CharLevel = "1"
Attributes = GetAtt() ###--- imports the attributes to be added to
character info
Strength = Attributes[0]
Dexterity = Attributes[1]
Inteligence = Attributes[2]
Charm = Attributes[3]
Luck = Attributes[4]
If there are only the five attributes you can condense this down to
a one-liner

(Strength, Dexterity, Intelligence, Charm, Luck) = GetAtt()
cursor.execute("""
CREATE TABLE %s
(
name CHAR(40),
gender CHAR(40),
job CHAR(40),
level TEXT,
str TEXT,
dex TEXT,
intel TEXT,
cha TEXT,
luc TEXT
)
""" % CharAccount)
Are you really creating a new TABLE for EACH character? And then
only saving ONE record into the table? That's likely going to swamp the
MySQL server's file system at some point -- having to cache dozens of
identical table definitions... And doing backups is going to also be a
pain as you have to specify each table individually. And why are you
using "text" (which in MySQL is a large memo field, AKA a "blob",
capable of holding something like 64KB EACH) to hold what, in most all
games, are numeric values!?

If "CharAccount" is supposed to be the unique identifier for a
character, I'd strongly recommend you create the table ONCE when
initializing the system I also recommend that you make it an integer --
done properly, you can even get rid of that NewAccount() operation:

CREATE TABLE characters
(
account integer not null auto_increment primary key,
name char(40) not null,
gender char(40) not null,
job char(40) not null,
level int not null,
str int not null,
dex int not null,
intel int not null,
cha int not null,
luc int not null
)

No AGE attribute? Are the characters immortal? said:
CharInfo = (CharAccount, CharName, CharGender, CharJob, CharLevel,
Strength, Dexterity, Inteligence, Charm, Luck)
As mentioned, using an integer account/primary key simplifies
this...

CharInfo = (CharName, CharGender, CharJob, CharLevel,
Strength, Dexterity, Intelligence, Charm, Luck)
# there are 2 l in intelligence said:
cursor.execute("""
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s)
""", (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,
Dexterity, Inteligence, Charm, Luck))
You packed everything into a tuple CharInfo, but then don't use it?

cursor.execute("""insert into characters
(name, gender, job, level, str,
dex, intel, cha, luc)
values (%s, %s, %s, %s, %s, %s, %s, %s, %s)""",
CharInfo)
cursor.execute("SELECT name, job FROM %s" % CharAccount)
while (1):
row = cursor.fetchone()
if row == None:
break
print "\n \n \n You just created: %s \n Job class is: %s" % (row[0],
row[1])
Since you are creating a table for each character, there will never
be more than one row in that select. However, the cleaner way to code
that loop is:

for row in cursor:
print "\n\n\n You just created..." % (...)

Now, by using ONE characters table, observe:

cursor.execute("select last_insert_id()")
CharAccount = cursor.fetchone()[0]
print "You just created account %s for character %s with job %s" %
(CharAccount, CharName, CharJob)

Name and Job are still available from the data you wrote to the
database, no need to fetch them back, the only thing new is the account
number assigned to the record.
cursor.close()
conn.commit()
conn.close()

print "\n \n \n Your character is made!"

MakeAgain = raw_input("\n \n \n Would you like to make another character
while we are at it? (y, n): \n")
MakeAgain = MakeAgain.lower()
MakeAgain = MakeAgain[0]
if MakeAgain == "y":
NewChar()
else:
return
You appear to have a recursive call here, each time you call
NewChar() you are nesting one layer deeper. Also...

Again = raw_input(....)
if Again.lower().startswith("y"):
...

Your whole character creation loop should look more like:

while True:
NewChar()
again = raw_input(...)
if not again.lower().startswith("y"): break

-------------------------------------------------------

The part that keeps getting me errors is:

-------------------------------------------------------

cursor.execute("""
INSERT INTO %s (name, gender, job, level, str, dex, intel, cha, luc)
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s)
""", (CharAccount, CharName, CharGender, CharJob, CharLevel, Strength,
Dexterity, Inteligence, Charm, Luck))

-------------------------------------------------------

i have tried various ways to do this string insertion, and i keep getting
errors. it seems that MySQLdb doesnt like me assigning a string to the
table name if im going to assign more to values... I have reworked the last

You have to take into consideration that a proper design does NOT
create randomly named tables or data fields; these are "schema" and the
SQL should KNOW what those names are. The parameter substitution
performed by MySQLdb is meant for user data items; it converts numerics
to string representation (up until MySQL5.x MySQL did not support
prepared statements so all operations were full string SQL passing, and
MySQLdb is still written to be compatible with older versions), it puts
escape characters around embedded quotes, etc. All this is done to make
sure that data obtained from a user is safe for insertion into a
statement.

If you really /really/ must have dynamic schema, you need to 1)
ensure that the schema definition (table/field names) NEVER come
directly from user input -- you have to generate them inside the program
and, at most, give the user a menu identifying which generated name is
to be used. 2) you need to then use Python % formatting to create that
part of the SQL -- this will require escaping the %s placeholders for
data so they don't get in the way.

sql = "insert into %s (...) values (%%s, %%s, ...)" % tablename
cursor.execute(sql, (data, value, stuff))


In summary, I believe you need to rethink your entire database
schema process. They way you are using it is treating it as a
one-character-per-file flat file. You could just as easily do THAT using
Python's ConfigParser module and write each character to an INI file...

[character]
name=...
job=...
level=...
....

[items]
weapons=sword,dagger1,dagger2,shield
potions=healing1,healing2,...

[sword]
type=...
damage=...

[dagger1]
type=...


------

In database terms of the above, I'd have one table for characters,
one for weapons, one for potions...

characters(ID, name, job, level, att...)
weapons(ID, characterID, type, damage, ...)
potions(ID, characterID, type, ...)

To find out which weapons a character has is:

select c.name, w.type from characters as c
left outer join weapons as w
on c.ID = w.characterID
where c.ID = %s

(supply the account ID of the character of interest. The left-outer-join
ensures you get back the character name even if it has no weapons.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
J

John Nagle

Bruno said:
Luke a écrit :
(snip)

OK. Bruno has pointed out why you're having trouble with
the syntax, but that's not the real problem. You probably
don't want a separate MySQL database for each account,
which is what you're doing. You only need one database
for multiple accounts. The account name can be a field.
You can look up things by any field, which is the whole
point of having a database.

(The database looks up much faster if you specify that
some fields are INDEX fields. But that can come later.)

John Nagle
 
D

Dennis Lee Bieber

yes, thats the easier way i can think of for now since i am so new to SQL,
eventually im sure i will put all the characters into one larger table
though... but for now i just dont feal like figuring out how to scan the
table for the records i need based on name of character... ill save that
for later. (unless there is a very easy way to do it that doesnt require
re)
How were you planning to scan all those separate tables then? Are
you keeping a list of them, then going to open each one to see what the
name contains?

At this stage, I think I'd recommend you pick up a small book on
relational database and/or SQL; the book should cover such things as
first, second, and third normal forms... primary keys... foreign keys
(and foreign key constraints and integrity, though MySQL doesn't fully
support such yet, especially not if using MyISAM tables). Then
formulating joins using those primary/foreign keys (to save some time: a
foreign key is a value in table-B that is used to link that table to the
primary key of table-A -- many people tend to think that this linkage is
what is meant by "relational" in "relational database"... * )

http://www.15seconds.com/issue/020522.htm
http://en.wikipedia.org/wiki/Relational_model
http://articles.techrepublic.com.com/5100-22-5034633.html
http://www.databasejournal.com/sqletc/article.php/1469521






* ... it isn't. In relational theory the "relational" applies a single
table -- the "relation" -- as the data fields in a /row/ are related via
the primary (and unique) key value of that row.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
J

John Nagle

Luke said:
(snip)

yes, thats the easier way i can think of for now since i am so new to SQL,
eventually im sure i will put all the characters into one larger table
though... but for now i just dont feal like figuring out how to scan the
table for the records i need based on name of character... ill save that
for later. (unless there is a very easy way to do it that doesnt require
re)

That's the whole point of SQL. You write a SELECT statement to
extract the records you want. A SELECT statement can select on
multiple conditions in one statement, and this is done very efficiently.
Just add a "characcount" field to your record, use one database,
and use select statements like

cursor.execute("SELECT name, job FROM gamecharacters WHERE characcout=%",
(charAccount,))

and MySQL will do the rest.

Your database searches will go much faster if you add some indexes.
Like

INDEX characcount,
INDEX name

And if you use add

UNIQUE INDEX name

no two characters can have the same name, even if they're from different
accounts. If you wanted to allow duplicate names from the same account,
you could write

UNIQUE INDEX (name,characcount)

which requires that the combo of name and characcount be unique.
With that rule in the database, an INSERT that tries to insert
a duplicate name will raise an exception.

You're on the right track; you just need to understand more of what MySQL
can do for you. Which is quite a lot.


John Nagle
 
B

Bruno Desthuilliers

Luke a écrit :
Bruno Desthuilliers wrote:



(snip)


(snip)

yes, thats the easier way i can think of for now since i am so new to SQL,

Then keep away from Python long enough to learn the most basic features
of SQL.
eventually im sure i will put all the characters into one larger table
though... but for now i just dont feal like figuring out how to scan the
table for the records i need based on name of character...

What you think SQL is for ? Selecting a given record (or a given set of
record) is actually the most basic SQL operation.
ill save that
for later.

You should not.
(unless there is a very easy way to do it that doesnt require
re)

WTF would you want to use regexps here ???

(snip)
wow, i was so focused on learning the MySQLdb module i have been overlooking
simply escaping my % signs the whole time... nice catch, thanks alot. it
works like a charm now.

Not as far as I'm concerned !-)
PROBLEM SOLVED, BUT IF YOU WANT TO ADD ANYTHING, FEEL FREE...

Yes : do what everyone here already told you : learn SQL !-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top