Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 410283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:52:24+00:00 2026-05-12T17:52:24+00:00

I have a form that searches a mysql db for whatever the user is

  • 0

I have a form that searches a mysql db for whatever the user is after, and returns the results on the same page in a div (using ajax then php to search mysql)…

The results are ads, as cars for example, and I want each ad to have a unique image associated with it so that it displays the images next to the ads…

Storing images in BLOBS arent really a good solution I have heard…

How would I do this the best way?

Thanx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:52:24+00:00Added an answer on May 12, 2026 at 5:52 pm

    A fast way will be to store images in a folder giving unique filenames in folder or separate folders if you want to put images of different categories in separate places. After searching the available ads, read associated unique file-names and server to client.

    Suppose you save images related to car ads in folder /images/cars/. User searches for Audi S6 and the result returns 5 ads.

    Now we will proceed based on the naming of the image files. If you give file related to each ad unique name and put that name into record for that ad then simply get that name and create image URL as follows:

    /images/cars/ + result_row('image_name')
    

    If you are naming images based on id of ad record then use this scheme:

    /images/cars/ + result_row('id')
    

    If you mean that at first you were sending image bytes in response, then you don’t need to do that. simply send the path constructed and use it in src property of img tag.

    PS:- My PHP skill are not very good now!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a simple mysql search form that searches between two dates. This
I have a search form and am displaying the results on the same page
I have multiple ajax forms on page that cointain same elemets, I have jquery
I have a form that allows the user to perform a myriad of searches.
I have a form that searches all rows in a single table (TServices) that
I have a simple form that searches through the 2000+ issues of a 3rd
I currently have form that checks if a user has unsubmitted changes when they
I have a form that uses jQuery to submit an ajax post and it
I have a search form that the user can search for an Article content
I have an application that searches a database of addresses. The page visitor enters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.