This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

mysql.mod help.

Old posts that have not been replied to for several years.
Locked
D
Duey

mysql.mod help.

Post by Duey »

Hi,
Im having trouble using the mysql_connect command properly this is my code can someoen tell me whats wrong with the args?

Code: Select all

mysql_connect "kicklog 69.57.136.102 username password"
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

I've not used the mysql.mod for eggdrop, and I could not find any documentation on the commands... so my guess is that they are the same as ordinary mysql-commands, then you should read this, hopefully it'll help you some
Elen sila lúmenn' omentielvo
D
Duey

Post by Duey »

Its the syntax thats troubling me eg:

mysql_connect <database> <hostname> [user] [password] [socket|port]

thats the syntax but its not clear wheather it needs to be in qoutation marks or wither socket and port are needed if so do i just go tcp|3306 or [tcp|3306] anyone that has used this module know how it works?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

well, why don't you just try without the "'s :)
Elen sila lúmenn' omentielvo
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Most programing documentation give no quotation marks, so this is somthing more of a generic reply.

Quotes are not needed by all langauges.

THey are used to make a language aware of the boundries of your argument.

In most langs, you don't need quotes on a single word/value parameter. This is true for Tcl.

Because Tcl interprets the space as a parameter seperator, you have to quotes values that need spaces in them.

If the instructions for the command where like so
this_command <parameter string>

Where "<parameter string>" is made up of
<value 1> <number2> <this 3>

EG
this_command "a b c"
Then you enclose the whole thing in quotes as shown

But in the command you have shown, it wants seperate aeguments. So use somthing like
mysql_connect dbname 127.0.0.1 user pass
Because each is only a 1 word (IE, no seperators in the values), you don't need the quotes.
Locked