0

hello friends,

if i want to search with A in searching and if i want to B
please send code

thanks

Rakesh Nagekar

2
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by Shanti C
0

in serach.php,,,
use your query like:

SELECT * 
FROM blog_table
WHERE blodLIKE 's%'

this query will return you all posts starts by s....

0

if i want to search from A to Z then in a single query can we

please

Rakesh Nagekar

0

yes,
use the query with your requirement..like

SELECT *
        FROM blog_table
         WHERE blodLIKE ''".$_POST['letter']."'%'

$_POST comes from browse blogs....

0

can u please tell in detail please
miss shanti garu
please andi

Rakesh Nagekar

Attachments
<table width="100%" border="0">
                  <tr>
                    <td>Search Blog( A-Z ) </td>
                  </tr>
                  <tr>
                    <td><table width="90%" border="0" align="center">
                      <tr>
                        <td> A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y |Z</td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>
					<table bgcolor="#aa5a87" border="0" cellpadding="1" cellspacing="1" width="100%">
                          <tbody><tr>
                            <td align="center" bgcolor="#c792af" height="23"><strong class="th-white-11">Blog Directory </strong></td>
                          </tr>
                          <tr>
                            <td bgcolor="#fdf5ff"><table width="100%" border="0" align="center">
                               <?
				
				
									 $fqur="select * from bg_blogs where Blog_title ''".$_POST['letter']."'%";
									  $fres=mysql_query($fqur)or die(mysql_error());
									
									   $c=-3;
									   while($frow=mysql_fetch_array($fres)){
									   if(($c%3)==0){ echo '<tr valign="middle">';} $c++;
									  ?>
                     <td width="4%" align='left'><img src="../images/ar-1.gif"></td>
					
                       
                          <td width="8%" align="left"  class="style20"><a href="blog-directory.php?sid=<?=$frow['category_id'];?>" class="blinks"><? $name=$frow['category_id'];?>
                              <?=getdata("bg_category","category_name","category_id=".$name);?> </a>  </td>
							   <td width="20%">&nbsp;</td>
							  <? if(($c%3)==0)
							  {
							  echo '</tr>'; } }
							  
							  ?>  </table>	</td>
                          </tr>
                        </tbody></table>
					
					</td>
                  </tr>
                </table>
0

hello:
use a href link to divert into search.php what letter you wan to see the blog...
At line 8:

<td> <a href="searchbox.php?value=a">A</a> | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y |Z</td>
This question has already been answered. 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.