•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 426,891 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,347 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 725 | Replies: 7
![]() |
•
•
Join Date: Feb 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
i have been getting this problem n this is getting into my nerves..
it works fine on the web.. but i need to present it on the intranet tomorrow "sunday"
it gives this damn error. of mysql_fetch_array..
can u plz help me
CODE:
<div id="right_nav">
<div id="cga_events">
<div id="navtop" align="center">
<div id="navtop_left">
</div><div id="navtop_right">
</div>
<div id="navtop_text">CGA Events</div>
</div>
<div id="pageNav">
<div id="sectionLinks">';
include("connect1.php");
$table = events;
$query = "SELECT id, topic, event, date
FROM events ORDER BY 'id' DESC LIMIT 5";
$result=mysql_query($query);
//LINE 140 while (list($id, $topic, $event, $date) =mysql_fetch_array($result))
{
echo" <font color=\"#006600\"> On ".substr($date,0,10)."</font>
<a href=\"$self?page=showevents&id=$id &topic=$topic \" class=\"elibtopic\">$topic</a>
";
}
echo'</div>
</div>';
warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\phpdev5\www\intranet cga\sept 25th 2007\myclub\index.php on line 140
it works fine on the web.. but i need to present it on the intranet tomorrow "sunday"
it gives this damn error. of mysql_fetch_array..
can u plz help me
CODE:
<div id="right_nav">
<div id="cga_events">
<div id="navtop" align="center">
<div id="navtop_left">
</div><div id="navtop_right">
</div>
<div id="navtop_text">CGA Events</div>
</div>
<div id="pageNav">
<div id="sectionLinks">';
include("connect1.php");
$table = events;
$query = "SELECT id, topic, event, date
FROM events ORDER BY 'id' DESC LIMIT 5";
$result=mysql_query($query);
//LINE 140 while (list($id, $topic, $event, $date) =mysql_fetch_array($result))
{
echo" <font color=\"#006600\"> On ".substr($date,0,10)."</font>
<a href=\"$self?page=showevents&id=$id &topic=$topic \" class=\"elibtopic\">$topic</a>
";
}
echo'</div>
</div>';
warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\phpdev5\www\intranet cga\sept 25th 2007\myclub\index.php on line 140
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
•
•
•
•
$query = "SELECT id, topic, event, date
FROM events ORDER BY 'id' DESC LIMIT 5";
Should be
mysql Syntax (Toggle Plain Text)
$query = "SELECT id, topic, event, date FROM events ORDER BY id DESC LIMIT 5";
Cheers,
Naveen
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
•
•
include("connect1.php");
$table = events;
$query = "SELECT id, topic, event, dateFROM events ORDER BY id DESC LIMIT 5";
$result=mysql_query($query);
//LINE 140 while (list($id, $topic, $event, $date) =mysql_fetch_array($result))
{
echo" <font color=\"#006600\"> On ".substr($date,0,10)."</font>
<a href=\"$self?page=showevents&id=$id &topic=$topic \" class=\"elibtopic\">$topic</a>
";
}
Why do you need the stuff in red?
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
•
•
•
•
when i placed the mysql_error() then it showed
And instead of
•
•
•
•
while (list($id, $topic, $event, $date) =mysql_fetch_array($result))
php Syntax (Toggle Plain Text)
while($row=mysql_fetch_array($result)){ $id=$row['id']; $topic=$row['topic']; $event=$row['event']; $date=$row['date']; ...
Last edited by nav33n : Feb 17th, 2008 at 12:46 pm.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Delete multiple rows in mysql with check box (PHP)
- paging related i have got this error Warning: mysql_fetch_array(): supplied argument (PHP)
- I am New In MySQL. Problem With MySQL Database Plz Help. (MySQL)
- Login problem (PHP)
- hello and plz help (PHP)
Other Threads in the MySQL Forum
- Previous Thread: Problem granting privilages...
- Next Thread: Regarding Mysql Query



Linear Mode