Jump to content

Search the Community

Showing results for tags 'mysqli'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Job Boards
    • Jobs
  • Community Lounge and FAQ
    • Forum News
    • Open Forum
    • New Members Forum - Start Here!
  • Entrepreneurship, Business and Marketing
    • Social Media Marketing & Web Marketing
    • Entrepreneurship
    • Career Questions - Asked and Answered
  • StudioWeb
    • StudioWeb
    • StudioWeb News
    • StudioWeb Projects
  • Programming
    • Python
    • Javascript
    • PHP
  • Web Design
    • Beginners Web Design
    • HTML/XHTML
    • Dreamweaver
    • CSS
    • Advanced Web Design
    • Business of Web Design
    • Web Design News
  • Miscellaneous
    • Cybersecurity
    • Miscellaneous Software
    • Blogs and CMS
    • Web Accessibility
    • Peer-to-Peer Reviews
    • Website Templates
    • Web Design Jobs
    • Test Forum
  • Archives
    • Beginners Web Design
    • Course: The Complete Entrepreneur
    • Web Accessibility
    • Photoshop
    • CSS
    • Forum Rules and Etiquette
    • Flash
    • ASP
    • General Programming
    • Expression Web
    • Beginners Ruby
    • Killersites University
    • Actionscript

Calendars

  • Community Calendar

Categories

There are no results to display.

There are no results to display.

Product Groups

  • Business & Entrepreneur Courses

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


LinkedIn


Facebook


Twitter


AIM


Yahoo


Other


Location


Interests

Found 2 results

  1. Hi people, I have one question about mysqli_fetch_assoc in a while loop. $query = "SELECT * FROM category "; $result = mysqli_query($connection, $query); while($row = mysqli_fetch_assoc($result)) { $cat_id = $row['cat_id']; $cat_title = $row['cat_title']; echo $cat_id . " " . $cat_title ."<br>"; } So, how does $row = mysql_fetch_assoc($result) works? So it loops one row at a time from $results and stores that information in $row until it there is no row to return? And this mysqli_fetch_assoc($result) in while loop iterations is this " array(some rows that it got from $result) "? $row = mysqli_fetch_assoc($result) is same as $row = array(all rows from $result that are gathered by mysqli_fetch_assoc) ? And that means $row is actually an array, and every time it loops the information is not overwriten by new instead it is added? Sorry if i confused you with such questions Thanks in advance!
  2. My PHP script for mysqli queries works most of the time, but while running a loop that queries database many times, occasionally I'll get Warning: PHP Warning: mysqli_stmt::execute(): (HY000/2013): Lost connection to MySQL server during query in... blah blah blah Can someone tell me if I need to modify the structure of my queries to make it work better? Here's my example: <?php $host = "localhost"; $username = "blah_blah"; $password = "blah_blah"; $database = "blah_blah"; $mysqli = new mysqli($host, $username, $password, $database,0,'/var/lib/mysql/mysql.sock'); $mysqli->set_charset('utf8'); if ($stmt = $mysqli->prepare("SELECT column_A FROM table_X WHERE column_B=? AND column_C=? LIMIT 1")){ $stmt->bind_param("si", $value_1, $value_2); $stmt->execute(); $stmt->bind_result($column_A_value); $stmt->fetch(); $stmt->close(); } ?>
×
×
  • Create New...