Solved

php warning: mysql_fetch_row()

Posted on 2014-12-01
7
155 Views
Last Modified: 2014-12-01
I have no idea if someone can help me with this or not but since my programmer is gone for 24hrs, I need to ask someone.

I am seeing the following error in the apache logs;

PHP Warning:  mysql_fetch_row() expects parameter 1 to be resource, string given in app.php on line 103

Line 103 is;

$select = mysql_fetch_row($query);
0
Comment
Question by:projects
7 Comments
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 125 total points
ID: 40474193
Check before this line whether you've execute the query with result. Example,
0
 

Author Comment

by:projects
ID: 40474199
The line before that is;

$result = execQuery($dbconn,$query);

Your example link doesn't seem to lead to anything.
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 250 total points
ID: 40474208
Means the query failed so there are no rows to fetch
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:projects
ID: 40474215
So it's just a warning, nothing to be concerned about? Or, does it possibly mean it is not finding the data?
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 125 total points
ID: 40474217
0
 

Author Comment

by:projects
ID: 40474222
Ok, so it looks like the programmer just missed this because everything else is using mysqli.
He just needs to update this then.
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 250 total points
ID: 40474225
Not really a warning, when executing the query something went wrong i.e. your sql is wrong
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now