473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

text search box record limit on php

1
hi!
my php code was text box value to get,in display only 10 record another record next page but 2 page record are not display...

code.......

Expand|Select|Wrap|Line Numbers
  1. <?php 
  2. $con=mysql_connect('localhost','root','');
  3. mysql_select_db('ashok_test');
  4. ?> <div id=""> <form action="http://bytes.com/" method="POST"> <input type="text" name="software_search" id="software_search" > <input type="submit" name="softSearch"> </div> <div id="softwaretables1" align="center"> <h1><b><i>Software Information</i></b></h1> <table id="hovertable" border="0"> <tr id="title"> <td id="id">    
  5. Id
  6. </td> <td>
  7.             Manufacture Name
  8.         </td> <td>
  9.             Software Name
  10.         </td> <td>
  11.             Version
  12.         </td> <td>
  13.             Product Id
  14.         </td> <td>
  15.             Manufacture Date
  16.         </td> <td>
  17.             Active Date
  18.         </td> <td>
  19.             Expired Date
  20.         </td> <td>
  21.             Licence
  22.         </td> <td>
  23.             Add
  24.         </td> <td>
  25.             Edit
  26.         </td> <td>
  27.         Delete
  28.         </td> </tr> <?php
  29. //$start_from = ($page-1) * 3; 
  30. //$sql =mysql_query("SELECT COUNT(Software_Name) FROM sofware_detail where Software_Name='$search'"); 
  31. if (isset($_GET["page"])) 
  32.  
  33.         $page  = $_GET["page"]; 
  34.  
  35.         echo "page1",$page,"<br>";
  36.  
  37.  
  38. else {
  39.  
  40.          $page=1; 
  41.  
  42.  
  43.  
  44.  
  45.  
  46. }; 
  47.  
  48.         $start_from = ($page-1) * 3; 
  49.         echo "Page no=",$page,"<br>";
  50.         echo "starting row=",$start_from,"<br>";
  51.         $search=$_POST['software_search'];
  52.  
  53.  
  54.         echo "text_Search=",$search,"<br>";
  55.         $sss = $search;
  56.  
  57.         $query=mysql_query("select * from  sofware_detail where Software_Name='$search' limit $start_from,3");
  58.  
  59.          $sql =mysql_query("SELECT COUNT(Software_Name) FROM sofware_detail where Software_Name='$search'"); 
  60.  
  61.         $rows = mysql_fetch_row($sql); 
  62.  
  63.         $total_records = $row[0]; 
  64.  
  65.         echo "total Record=",$total_records,"<br>";
  66.         $total_pages = ceil($total_records / 3); 
  67.         echo "total Page=",$total_pages,"<br>";
  68.         for ($i=1; $i<=$total_pages; $i++) 
  69.         { 
  70.             echo "<a href='count1.php?page=".$i."".$search."'>".$i."</a> "; 
  71.  
  72.         };
  73.         while($row=mysql_fetch_array($query))
  74.  
  75.         {
  76.  
  77.         ?> <tr onmouseover="this.style.backgroundColor='#ACB0C2';" onmouseout="this.style.backgroundColor='';" id="content"> <td backgroundColor='#30818B'><? echo
  78.                     $row['id'];?> </td> <td><? echo    $row[1];?> </td> <td><? echo$row['Software_Name'];?> </td> <td> <? echo$row['version'];?> </td> <td><? echo$row['serial_number'];?> </td> <td> <? echo$row['manufacture'];?> </td> <td> <? echo$row['active_date'];?> </td> <td> <? echo$row['expery'];?> </td> <td> <? echo$row['licence'];?> </td> <td> <a href="SW_Info_edit.php?id=<?echo $row['id'];?>"><IMG SRC="http://server01/ashok/5-3-2014/edit-validated-icon.png" id="edit_image" ></a> </td> <td> <a href="javascript:if(confirm('Are you sure you want to delete this record?')==true)
  79.                                     {window.location='SW_Info_delete.php?id=<?php echo $row["id"];?>';}"><IMG SRC="http://server01/ashok/5-3-2014/images.jpg" id="delete_img" ></a> </td> <td> </td> </IMG> </tr> <?}?>
May 30 '14 #1
1 1530
Luuk
1,047 Expert 1GB
after "code......." you should have used the button in the toolbar that says '[CODE/]'
May 30 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: dave | last post by:
I am wondering if the following can be done. I want to setup a search page that utilizes full text searching in sql2000. I want the user to type in say "where is bill" and have the query search...
3
by: Andrew Crowe | last post by:
Hi guys, I have a table currently set up like this: <- -> video ------ video_id
3
by: Trevor Fairchild | last post by:
I'm trying to execute a full-text query from a vb.net web application. The problem I have is that in SQL Server, the syntax for a full-text search is SELECT * FROM table WHERE CONTAINS( *, '...
4
by: bdotson | last post by:
Does anyone know the record limit for a single table in Access 97? I have a client who has over 800,000 records in one table. They are experiencing math problems and timeouts when running reports....
1
by: simon | last post by:
hi, I have the directory with files with doc or txt or similar extensions. Now I would like to create a text search (something similar like find text ALT+F7 in windows commander): user inputs...
4
by: Steven | last post by:
Hi, Would need some thought about using a button of the existing form to search record before deleting it. Any quick help is very appreciated. Steve
1
by: lankansoft | last post by:
I have added full text search to my website recently. The searching facility is working fine and the search string should have at least 4 letters. Now I need the search engine to work on strings...
8
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are...
0
by: drosemeyer | last post by:
I'm trying to use DB2 Text Search with DB2 9.7 FP1 on Windows. Text search uses the standard configuration. Basically it works, it is possible to create and update text indexes for smaller tables,...
4
by: Akbar Abro | last post by:
How can I search record from database and it should display on another form in DataGrid or Textboxes Help me please. I have to display search result on another web-page.. kindly tell me how can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.