I am getting error while fetching value from table using Python and Django. The error is below:
Exception Type: TypeError
Exception Value:
not all arguments converted during string formatting
My code is below:
rname = request.POST.get('rname')
keyword = '%' + rname + '%'
all_value = Meeting.objects.raw("SELECT * FROM booking_meeting WHERE room_name LIKE ? ", (keyword,))
Here I am getting the error.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…