Solved

php warning: mysql_fetch_row()

Posted on 2014-12-01
7
161 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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 83

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 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