| View previous topic :: View next topic |
| Author |
Message |
Freakazoid Voice
Joined: 31 Jul 2005 Posts: 11
|
Posted: Sat May 26, 2007 7:10 pm Post subject: if else ? |
|
|
i got one quest! i wanna use a if script request for an sql output
with an else error if entry not found in the db.
how can i make it
in php is it easy if($nick='$ds[nick]) { echo'output info'; } else { echo'error no user found' }
but how works it with tcl ?
mfg freak  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat May 26, 2007 7:16 pm Post subject: |
|
|
"if <conditional> [then] <what todo if true> else <what todo if false>"
Checking the manpage for "if" might also be a good idea...
Most common structures would be like this:
| Code: | if {sometest} {somecode} {someothercode}
if {sometest} {
somecode
} {
someothercode
} |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Freakazoid Voice
Joined: 31 Jul 2005 Posts: 11
|
Posted: Sat May 26, 2007 7:18 pm Post subject: |
|
|
| nml375 wrote: | "if <conditional> [then] <what todo if true> else <what todo if false>"
Checking the manpage for "if" might also be a good idea...
Most common structures would be like this:
| Code: | if {sometest} {somecode} {someothercode}
if {sometest} {
somecode
} {
someothercode
} |
|
thx nml375
one quest give it some good tutorials or links ? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
|
| Back to top |
|
 |
Freakazoid Voice
Joined: 31 Jul 2005 Posts: 11
|
Posted: Sun May 27, 2007 7:22 am Post subject: |
|
|
thx Alchera |
|
| Back to top |
|
 |
|