Python Forum
Problems creating a search engine
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems creating a search engine
#23
Hey so I'm trying to apply the code to my project and it's just not working. I just don't understand how to insert the SQL. why is it so complicated?

Where can I see where I can just learn how to type the SQL code? I don't get it. It shouldn't be this complicated. It's easier to write actual SQL code on its own. Why would Python make it more complicated? With all these placeholders and secret curly brackets and all this?

Your example is not taking user input so it doesn't really help me as far as syntax goes.

Thanks so much for taking the time, though.

Can someone please help me try to figure this out? I've been working on this project for 6 weeks and I just keep hitting a wall and I can't find solid documentation to back me up.

Please don't just send me the link to the documentation - it isn't specific and it's very confusing.

thank you!

Here is my code currently :

@app.route("/search", methods=["GET", "POST"])
def search():
    searchString = 'user'
    b = db.execute("SELECT * FROM books WHERE author LIKE :search", {'search': searchString}).fetchone()
    print(b)
    return render_template("search.html")
Reply


Messages In This Thread
Problems creating a search engine - by card51shor - Jun-14-2020, 12:46 AM
RE: Problems creating a search engine - by Yoriz - Jun-15-2020, 09:37 AM
RE: Problems creating a search engine - by Yoriz - Jun-15-2020, 05:13 PM
RE: Problems creating a search engine - by card51shor - Jun-16-2020, 03:17 AM
RE: Problems creating a search engine - by Yoriz - Jun-16-2020, 05:50 AM
RE: Problems creating a search engine - by ndc85430 - Jun-16-2020, 04:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Website with recommendation engine Bartthew 1 2,356 Jul-25-2019, 11:42 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020