sql query/displaying results question

From: Adam Williams (awilliam_at_mdah.state.ms.us)
Date: 10/23/03


Date: Thu, 23 Oct 2003 09:06:14 -0500 (CDT)
To: php-general@lists.php.net

I have a php page I am writing with an SQL query. I am going to query the
database for a couple of fields. One of the fields I am querying is the
title oh the document someone is searching for. The title will be used at
the top of the html page and will say:

"you are searching for document number ###: document $title"

but then later on down on the page when it starts returning your results:

"document $title: document $location"

So I will have 1 query that needs to print the document $title at the top
of the page and then when it starts showing results. I won't know what
the document title is until the database is queried (because they are
doing a query for keywords in the documents stored in that table in the
database). So at the top of the page can I use my $title from the
database and then when I start showing the results, can I show the same
document $title from the 1st row returned if I am using a while loop, or
because I already used $title at the top from the 1st row returned, will
it want to start at the 2nd row returned when I start my while loop to
return all of the data?

                        Adam



Relevant Pages

  • Re: Converting from Access to SQL2k via Excel- HELP!!!!!
    ... Then create a new query and paste the following into its SQL ... > In your database you'd need to start with a query that ... The function that you pointed me to allows me to concatenate all ... The problem that I have is that I need to put it into a loop ...
    (microsoft.public.access.conversion)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: OT: SQL
    ... query processing. ... FROM Employees e, Employees m, Management mgt ... Manager and Employee Salaries. ... The scheme used does not model database files in general, ...
    (sci.logic)
  • RE: Import external data - web query
    ... Your reply for my query is very extensive, this is for importing a file from ... The data source I want isn't listed in the Select Data Source dialog box. ... information used to connect to a database. ... Check your driver First, make sure you have the right ODBC driver (Open ...
    (microsoft.public.excel.misc)
  • Re: access 2003
    ... I removed the parameters from the form query source. ... boxes from the form header, events, code, etc and ran the form query source ... forms queries and the SQL because syntax of the SQL will change randomly. ... the Access 97 database, I wouldn't have thought any expressions would be ...
    (microsoft.public.access.conversion)