employee_test = frappe.db.sql("""
select name
from `tabEmployee` where name like 'EMP/0001'
""")
And I need to display the employee_test in msgprint but without showing the characters that come with the returned string. Because it appears like following: ((u’EMP/0001’,),) and I need to display only EMP/0001. Is there a way?
Thanks a lot for the kindly help and reply.
Now it is displaying it like this: {‘name’: u’EMP/0001’}.
I have really two questions regarding this point:
How I can display only EMP/0001?
In case my query was selecting two columns, so it is like below:
employee_test = frappe.db.sql(“”"
select name, prefered_email
from tabEmployee where name like ‘EMP/0001’
“”" , as_dict=True)
The output of format(employee_test) is:
{‘name’: u’EMP/0003’, ‘prefered_email’: u’maher@ghayad.com’}
If I need to deal with prefered_email column only, what I have to write? For example, I need to know the value of the column prefered_email, what should I write?