0

Hello everyone, i was hoping i could get help for a search script that displays not just the text results but also an image based on the search query for eg: if you are searching for a book by author or name of a book in the results page it should show the text as a link which can be clicked to view the image or it can just show the text and image together. i would really be indebted to whoever can help me out here, thanks and God bless!!!

5
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by Lsmjudoka
0

If you can display the text you can also display the name of the image that you upload for that author or book, you don't need a special search script, you need only a field for the image :)

0

use like clause in query . retrive all the information frm database which is related to searchcontent. there is no need to serch image.

$sql = mysql_query("SELECT * FROM tablename WHERE author_name LIKE 'searchcontent%'");

while ($row = mysql_fetch_row($sql)) {
echo "$row[0] $row[1] $row[2] <br />";
}

Edited by muralikalpana: n/a

0

Thanks guys, i really appreciate your contributions, but does anyone know how i can get a full working bookstore script example so i can learn from...

0

i think this code help you, it fetch data from database
<?php
$q = 'select * from table_name';
$r = mysql_query($q);
?>
<table>

<tr>
<th>Name</th>
</tr>

<?php
while($row=mysql_fetch_object($r)){
echo "<tr><td><b>$row->name</td>
?>

0

Thanks guys, i really appreciate your contributions, but does anyone know how i can get a full working bookstore script example so i can learn from...

If this is your problem, I'd bet you need to learn to make algorithms and plan things out before coding them.

Basic programming process:

1: Figure out exactly what your program needs to do. As detailed as possible. (VERY IMPORTANT)
2: Figure out how you can do that. Make a set of steps(algorithm) for your program to follow. (VERY IMPORTANT)
3: Code it
4: Test/debug

Edited by Lsmjudoka: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.