Jump to content

Concatenating


LittleNicky

Recommended Posts

I am not sure about the constructor, but it may be this:SELECT * mytable WHERE {$a_php_variable}=(field1 + field2)This doesn't concatenate the fields, but checkes a value against the values of the one field glued to the value of the other. It can be like this too:SELECT * mytable WHERE field1 + field2 = '{$a_php_variable}'Which looks more logical :)

Link to comment
Share on other sites

I am not sure about the constructor, but it may be this:SELECT * mytable WHERE {$a_php_variable}=(field1 + field2)This doesn't concatenate the fields, but checkes a value against the values of the one field glued to the value of the other. It can be like this too:SELECT * mytable WHERE field1 + field2 = '{$a_php_variable}'Which looks more logical :)
Ok so would this work:SELECT * mytable WHERE firstname + " " + lastname= '{$fullname}'if $fullname equals 'firstname lastname'
Link to comment
Share on other sites

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...