LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 05-09-2012, 06:54 AM   #1
shygvy
LQ Newbie
 
Registered: May 2012
Posts: 10

Rep: Reputation: Disabled
PLS how do i solve this ish?


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\content.php on line 40

while($page = mysql_fetch_array($page_set)){
echo "<li";
if ($page ["id"]==$sel_page){
echo "class=\"selected\"";
}
echo"><a href=\"content.php? page=" . urlencode($page["id"]).
"\">{$pages["name"]}</a></li>";
}
my line 40 is
while($page = mysql_fetch_array($page_set)){
 
Old 05-09-2012, 07:00 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
I've reported this as a double post of your other thread, since the two are closely related.

Also, as per the LQ rules, please write out your words in full.
 
Old 05-09-2012, 07:30 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,871
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
Always check for errors after mysql_query:

Code:
$result= mysql_query ($stmt);
if ($result===FALSE) {
    printf ("<H1>Error in '%s': '%s'</H1>\n",
    htmlspecialchars ($stmt),
    htmlspecialchars (mysql_error ()));
    exit (1);
}
 
Old 05-09-2012, 11:50 AM   #4
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
shygvy, please post the same question in one thread only. As Nylex pointed out, you posted the same question as a followup in your original thread. It's okay to do either, just not both.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to solve these Mail questions in linux pls help shipon_97 Linux - Newbie 3 04-28-2009 07:46 AM
pls help me to solve the error while installing the rapidsvn-0.9.4 nagendrar Linux - Software 1 12-19-2008 04:08 AM
what happen ? pls, tell me how to solve. heinlynn Linux - Software 6 10-18-2007 08:18 AM
Pls Help Me To Solve This Squid Errors... hjehmssgm Linux - Software 1 08-06-2007 06:29 AM
can any1 solve me this prob pls! ibra82 Linux - Software 5 11-01-2005 12:02 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration