Jump to content

Search the Community

Showing results for tags 'boolean given'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 1 result

  1. My code is, <?php // This block allows our program to access the MySQL database. // Stores your login information in PHP variables require_once '223login.php'; // Accesses the login information to connect to the MySQL server using your credentials and database $db_server = mysql_connect($db_hostname, $db_username, $db_password); // This provides the error message that will appear if your credentials or database are invalid if (!$db_server) die("Unable to connect to MySQL: " . mysql_error()); mysql_select_db($db_database) or die("Unable to select database: " . mysql_error()); // Store the query string from 2.2.3.A Step 17 $query = "SELECT * FROM requests WHERE model_id=1"; // Searches the database returning results that match the query // Results come in a table stored in $requests_for_model $requests_for_model = mysql_query($query); // The mysql_num_rows function returns an integer representation of number of rows for the table passed as an argument $number_of_requests = mysql_num_rows($requests_for_model); for ($current_row = 0; $current_row < $number_of_requests; $current_row++) { // walker variable (through rows in the table) $request = mysql_fetch_row($requests_for_model); // query directed to get a table containing the one row that has a store matching the store ID in the current request $query = "SELECT * FROM store_info WHERE store_id='" . $request[1] . "'"; $store_requesting = mysql_query($query); // A table containing the store $store = mysql_fetch_row($store_requesting); // Get the only row in the table (unique store ID number guarantees this) echo $store[2]; // output the 2nd item in the row for that store, which is the city if ($current_row < $number_of_requests - 1) // Makes sure commas are only printed after results that are not the last { echo ", "; } } ?> I do not know how to fix this. Help much appreciated.
  • 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.