Jump to content

Recommended Posts

Posted

$sQuery = 'SELECT User_Name FROM Users WHERE User_Name="David"'

Replace David with variable $UserName

$sQuery = 'SELECT User_Name FROM Users WHERE User_Name= $UserName' -nope tried a few ways, none working

Anyone spot my mistake?

Posted

$sQuery = 'SELECT User_Name FROM Users WHERE User_Name=' & $UserName

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Posted

Is it possibly an issue with quotation marks?

That is, considering the need for double ("") if you want the quotes to be passed as part of the string:

$UserName = ""David""

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Posted

error looks right but does not include " around the userid . . . could be causing it . . . how would you insert " around it """ will not insert the text "

Posted

$UserName = '"David"'
$sQuery = 'SELECT User_Name FROM Users WHERE User_Name=' & $UserName
MsgBox(0,"",$sQuery)

My mistake on the above entry, should have used single (') around the doubles(")

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Posted

$UserName = '"David"'
$sQuery = 'SELECT User_Name FROM Users WHERE User_Name=' & $UserName
MsgBox(0,"",$sQuery)

My mistake on the above entry, should have used single (') around the doubles(")

Thanks, works well :whistle:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...