DO YOU NEED A CONTENT WRITER FOR YOUR BUSINESS?

Your One-Stop Solution for All Content Needs! Click here for more!
Categories: MySQL

mysql_fetch_array() expects parameter 1 to be resource, boolean given

Share

Trying to select data from a MySQL table, but getting the error messages:

mysql_fetch_array() expects parameter 1 to be resource, boolean given?

– This may happen for various reasons like both the mysql_* and the mysqli extension will return false from their query functions.

– Using a die() you can get a little to much.

– Use mysql_error() which reports any errors that MySQL encountered while performing the query.

– If you have a syntax error in your query you can check with tools like phpMyAdmin.

– A missing quote around the mysql query or a value can cause a failure.

– Do not mix mysqli_* and mysql_* functions.

– Make sure you are escaping your all values.

Jacob Frazier

Based on United States, Jacob Frazier is a skilled JavaScript developer with over 8 years of experience. He is passionate about change and trying new things, both professionally and personally. He loves startups and is extremely proactive.

Recent Posts

How Did The Restaurant Industry change In Post Pandemic Era?

The coronavirus outbreak has drastically changed the way we live our lives. Yes, that's absolutely…

1 week ago

A Guide To CPQ and How It Fuels Marketing and Sales

Sales and marketing teams help attract, convert, and retain customers to ensure an organization’s long-term…

2 weeks ago

Top Questions Asked About Invoice Financing Applications

Are you an owner of a small business who’s trying to come up with ways…

3 weeks ago

Complete Medical Guide to Blood Sugar Testing and Glucose Control

Introduction When patients bring me their lab reports, the confusion is almost always the same.…

4 weeks ago

6 Tips to Strategically Remodel Your Home

Are you excited about remodeling your house after a long time? Perhaps if you're planning…

4 weeks ago

Driving Finding Balance on and off the Mat: How Calm Awareness Supports Everyday

The practice of yoga teaches us to be present, patient and mindful of our decisions.…

4 weeks ago