Jump to content

Search the Community

Showing results for tags 'loop_iterating_msql_databse'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hello: I have been working on this code for some time. It is for a directory database for which I am retrieving information from two tables. From one table I am retrieving one entry while multiple entries are retrieved from another table. The problem is that I only the one entry to display only once followed by the display of the multiple entries following it. The way I have it set up now the entry I only want to appear at the top of the disp;ay repeats itself for every record it is associated with. Here is my code: { $library_search=$_POST ['Library_search']; $query= "select * from library RIGHT JOIN name USING (Library_ID) WHERE library_name like '%".$library_search."%'"; $query_results=mysql_query($query)or die (mysql_error()); $match_results=mysql_num_rows($query_results); } for ($i=0; $i < $match_results; $i++) { echo '<tr><td>'; $row=mysql_fetch_array($query_results); echo ($row ['university_name']),'<br/>'; echo ($row ['library_name']),'<br/>'; echo ($row ['address']),'<br/>'; echo ($row ['city']),'<br/>'; echo ($row ['state']),'<br/>'; echo ($row ['zip']),'<br/>'; echo ($row ['fax']),'<br/>'; echo ($row ['home_URL']),'<br/>'; echo ($row ['catalog_URL']),'<br/>'; echo ($row ['hours_URL']),'<br/>'; echo ($row ['special_access']),'<br/>'; echo ($row ['FirstName']), " "; echo ($row ['Middleinit'])," "; echo ($row ['LastName']),'<br/>' ; echo ($row ['PositionHeld']),'<br/>' ; echo ($row['OtherPosition']),'<br/>' ; echo ($row['Library_ID']),'<br/>' ; echo ($row['Address']), '<br/>'; echo ($row['City']), " "; echo ($row['State'])," ", " "; echo ($row['zip']),'<br/>'; echo ($row['Workphone']),'<br/>'; echo ($row['Residencephone']), '<br/>'; echo ($row['Email']),'<br/>'; echo ($row['WAALMember']), '<br/><br/>'; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.