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

Top 6 leadership skills and why they are important

Finally, your experiences will develop you as a leader, and the specific abilities you'll need…

3 days ago

How to Choose the Right VPN for Streaming, Gaming, and Secure Browsing

Assess Your Primary Use Case First question: what are you actually doing with a VPN—streaming,…

4 days ago

Key Tools for Reporting in Business Intelligence

Data is an essential aspect of today's business. Moreover, most companies gather customer data at…

4 days ago

Just Another Kind Of Soup? Dismantling Myths About Borshch

More and more countries go back to their unique national identity and rediscover long-forgotten foods,…

5 days ago

Flawless Prize Fulfilment and Management That Takes Your Marketing Campaigns to the Next Level

In today’s fast-paced and highly competitive marketing environment, even the most creative campaign is only…

1 week ago

Moving company Zeromax in NYC

We are NYC moving firm. Are you planning a flat move? Maybe a distance or…

2 weeks ago