Link to home
Start Free TrialLog in
Avatar of Ahmad Sarairah
Ahmad Sarairah

asked on

search button code

i would like to help me to make search button in this code to filter data by first_name or last_name or birth of date or any thing  .
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

We will need more information:
   What code?
   What programming language?
Avatar of Ahmad Sarairah

ASKER

the code is written by python 2.7 . it was a student form GUI . the full code is attached by my comment .

thanks for all
student_form.py
I'm not a Python person and only have a basic working knowledge of MySQL but it seems like you can just use Bind Variables to pull the contents of the form fields to build a where clause for your select.

This is Oracle but it should be pretty much the same for MySQL.  It is the Bind variable pieces that are important:
https://community.oracle.com/thread/918283
i have not good experience  of oracle form and i do not understood what is Bind variables and how to use them to make search button

please i need to more information about bind variables .

thanks for all
>>please i need to more information about bind variables .

There are MANY papers/links/blogs out there that talk about them.  Many will likely explain it better than I can here.

I always try to start with Wikipdia and go from there:
https://en.wikipedia.org/wiki/Prepared_statement

There are many others in the Google/Bing results:
https://www.akadia.com/services/ora_bind_variables.html


Many people try to use string concatenation to build a WHERE clause.  This is dangerous because it opens to code up to SQL Injection.  There are many pages on the web that talk about this as well.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.