I am trying to figure out a way to do this:
If (blah = 0 then 'Yes' else if blah = 1 then 'no' else 'maybe')
in mysql. I am trying to do this since I inserted all my data into a gridview via:
Dim strSQL As String
strSQL = "SELECT id, billing_first_name, billing_last_name, billing_email, billing_address, billing_city, billing_state, billing_zip, " & _
"total, price_mode, process_status, 1 as num_of_items " & _
"FROM orders " & _
"ORDER BY created_on DESC, processed_on DESC LIMIT 0, 20;"
Dim dtReader As MySqlDataReader
objCmd = New MySqlCommand(strSQL, objConn)
dtReader = objCmd.ExecuteReader()
grdView.DataSource = dtReader
grdView.DataBind()
If I can do the if/then/else somewhere in vb.net code above instead of in the database then that would be nice as well. I'm more used to doing it that way with normal query code.
I can currently do this with only if and then else, not if, elseif and then else.
SELECT IF(process_status = 1, 'SUCCEEDED', 'blah') as message, id,...
Thanks!