Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. scitech

    SQL in VB

    Thanks I knew I would It just that I cannot get it to work
  2. scitech

    SQL in VB

    I have two joined tables I use a macro to open a form (+ subform) with a filter query the dialog for user input from the first table works fine when I try to add another criteria from the second table to the query another dialog box opens (unexspected)and the query breaks down. The query works...
  3. scitech

    opening form with macro

    I have two joined tables I use a macro to open a form with a filter query the dialog for user input from the first table works fine when I try to add another criteria from the second table to the query another dialog box opens (unexspected)and the query breaks down. The query works fine on it's...
  4. scitech

    paginate a search problem

    ...</FORM> <?PHP if ($_POST['SurName'] ) { $queryItem = 'SurName="'.mysql_escape_string($_POST['SurName']).'"'; } if($queryItem) { /* Instantiate class */ $p = new Pager; /* Show many results per page? */ $limit = 1; /* Find the start depending on $_GET['page'] (declared if it's null)...
  5. scitech

    pagination problem

    Hi woody basically I copied your code straight across, just to see what would happen!. So I have no output before the session_start(). Just the two includes and the $page_name = 'update_form01.php'. I have read that session_start() must come at the very beginning of the page code. So I moved...
  6. scitech

    pagination problem

    Hi Woody The line 16 is the session_start() if(isset($_POST['Search'])) { session_start(); unset ($_SESSION); $_SESSION = $_POST; }
  7. scitech

    pagination problem

    Hi Woody Thanks for the Session() code, I've just started looking at Sessions. But I now get these error messages:- Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\Inetpub\wwwroot\sql...
  8. scitech

    pagination problem

    ...code. echo $query1, then a bit later :- echo $query. When I now run a blank query(no form imput) the $query1 gives no error message(SELECT * FROM Addressbook WHERE), but $query gives:- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for...
  9. scitech

    pagination problem

    hi woody All I have done is just change the above code(at the top here) so that the second query was exactly the same as the first,to find some errors, echo'ed both and the first ran fine but the second gave the you have an error....line 2 error. I have looked hard at the $queryItem[] area and...
  10. scitech

    pagination problem

    hi woody $query1 = "SELECT * FROM Addressbook WHERE ".implode(" AND ", $queryItem) or die(mysql_error()); echo $query1; $query = "SELECT * FROM Addressbook WHERE ".implode(" AND ", $queryItem) or die(mysql_error()); echo $query; If I run the code above as...
  11. scitech

    pagination problem

    Hi woody $query = "SELECT * FROM Addressbook WHERE ".implode(" AND ", $queryItem)." LIMIT $eu, $limit " or die(mysql_error()); echo $query; when I run this query I get:- SELECT * FROM Addressbook WHERE Surname="Hirschfeld" LIMIT 0,1 or if I leave the input blank I get "you have an...
  12. scitech

    pagination problem

    hi Woody I don't understand "SELECT * FROM addressbook WHERE ".implode(" AND ",$queryItem)." LIMIT $eu, $limit"; is my query SELECT * FROM Addressbook WHERE Surname='Hirschfeld' LIMIT 0,1 is the echo of the query when I run the query, I might want to search for postcode or firstname not just...
  13. scitech

    pagination problem

    Hi Woody Here is the echo SELECT * FROM Addressbook WHERE Surname="Hirschfeld" LIMIT 0,1 it all looks fine to me, this query should return more than 1 record, if i want to display two records on the page it does display the two records,but if I display 1 record and then click next all I get is...
  14. scitech

    pagination problem

    Hi woody Sorry that's my typo here, I have that code version, and I have tryed lots of adding and taking away spaces, for some reason it does not like the Where statement
  15. scitech

    pagination problem

    ...The echo $query, gives me the query with the values for the Limit section. My problem is that the code works fine when it is like this "SELECT * FROM addressbook LIMIT $eu, $limit"; It is when I have added the WHERE statement that it only displays the First(as chosen by the variable $start)...
  16. scitech

    pagination problem

    ...= "Postcode='".mysql_escape_string($_POST['Postcode'])."'"; } //////////////////////////now create query statement $query1 = "SELECT * FROM Addressbook WHERE ".implode(" AND ", $queryItem) or die(mysql_error()); $result1 = mysql_query($query1) or die(mysql_error()); $nume =...
  17. scitech

    display one row at a time

    ...where do you put the limit statment in a query, I have found some examples and it goes at the end, but I have a query like this $query1 = "SELECT * FROM Addressbook WHERE ".implode(" AND ", $queryItem) or die(mysql_error()); $result1 = mysql_query($query1) or die(mysql_error()); and I...
  18. scitech

    display one row at a time

    ...+ $limit; /////////////// WE have to find out the number of records in our table. We will use this to break the pages/////// $query2 = "SELECT * FROM $table_name"; $result2 = mysql_query($query2) or die(mysql_error()); $nume = mysql_num_rows($result2); /////// The variable nume above will...
  19. scitech

    display one row at a time

    What I want to do is display the results of a query one at a time with a "button click" to move/display to the next row. i have been trying to use mysql_fetch_array, with a break to the loop. I have found many next/previous methods too complicated for me to understand so cannot adapt. Is there a...
  20. scitech

    Update not working!

    Thanks Ken I saw it eventually Do you have any tips for syntax error checking? Like that last one I had been looking for half an hour before i saw it charlie

Part and Inventory Search

Back
Top