MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 19th, 2000, 07:52 PM
siri siri is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 1 siri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
this is the warning i get
Warning: 0 is not a MySQL result index in ////allproject.php3 on line 27
This is the code
<?php
require('./common.inc');
$conn=conn();
$today = time();
if ($closed != 1)
$r = mysql_query("select pri.*, pri.des as prdes, p.*, s.*, s.des as sdes, p.des as pdes , u.* from pri, project p, status s, user u where u.uid=p.uid and s.sid = p.sid and pri.prid = p.prid and s.des <> 'Closed' order by $order desc", $conn);
else if ($closed == 1)
$r = mysql_query("select pri.*, pri.des as prdes, p.*, s.*, s.des as sdes, p.des as pdes , u.* from pri, project p, status s, user u where u.uid=p.uid and s.sid = p.sid and pri.prid = p.prid and s.des = 'Closed' order by $order desc", $conn);
unset($valid_row);
$valid_row = mysql_fetch_row($r,1);
$vrow=1;
while ($valid_row) {
$pid = mysql_result($r,0,"pid");
$status=mysql_result($r,0,"sdes");

seems to me it does not like
$valid_row = mysql_fetch_row($r,1);

Reply With Quote
  #2  
Old April 20th, 2000, 09:19 AM
Kyuzo Kyuzo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Location: Annapolis, Maryland US
Posts: 113 Kyuzo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
try
$valid_row=mysql_fetch_row($r);

Just curious about the second argument (1) in the mysql_fetch_row function?

otherwise, try the ever helpful mysql_error();

print(mysql_error());

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > can any one tell me whats wrong with this code?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway