Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Mysql Errors, cant find whats wrong :(
pbrugge
post Oct 18 2004, 09:08 PM
Post #1


Premium Member
********

Group: Members
Posts: 178
Joined: 14-October 04
Member No.: 1,752



I am working on my guestbook, better to say I am transfuring it from old to new site, but I got some errors now I did not had at my old hoster and I cannot figure out whats wrong:
CODE

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/pbrugge/public_html/guest.php on line 104

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/pbrugge/public_html/guest.php on line 110


This is the complete relevant code perhaps I overlooked something but I keep overlooking it huh.gif
CODE

if(!$rowstart) $rowstart=0;

$result = mysql_query("select * from gbook order by id desc limit $rowstart,20");
$result2 = mysql_query("select * from gbook");

$numrows = mysql_num_rows($result2);


//set backfire list


while($r=mysql_fetch_array($result))

{
  echo "<div class='ginfo'>Posted By:
       <a href='mailto:$r[email]'>$r[name]</a></div>";
  echo "<div class='gmes'>$r[message]</div>";
}


Which mysql - php guru can help me with this?
Go to the top of the page
 
+Quote Post
OpaQue
post Oct 18 2004, 09:44 PM
Post #2


Administrator
Group Icon

Group: Admin
Posts: 1,556
Joined: 11-June 04
From: Somewhere in Time & Space.
Member No.: 1
myCENT:97.31



Definately something wrong with the mysql code or the syntax
It can also happen if the version is old.
Go to the top of the page
 
+Quote Post
pbrugge
post Oct 18 2004, 11:23 PM
Post #3


Premium Member
********

Group: Members
Posts: 178
Joined: 14-October 04
Member No.: 1,752



QUOTE(admin @ Oct 18 2004, 09:44 PM)
Definately something wrong with the mysql code or the syntax
It can also happen if the version is old.

Old version of what mysql?
It hosted here so I guess mysql version is oke, script is my own so there's no version number there wink.gif
Go to the top of the page
 
+Quote Post
pbrugge
post Oct 18 2004, 11:41 PM
Post #4


Premium Member
********

Group: Members
Posts: 178
Joined: 14-October 04
Member No.: 1,752



Arg found it it was a problem with the database_user rights I did set it a little to strict, works now,

Told ya it would be something stupid wink.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Problem On Mysql "order By"(5)
  2. Php News Script(19)
  3. Increment A Mysql Column(7)
  4. Php Include Root Ref(6)
  5. Can You Add Images Into A Mysql Database?(21)
  6. Subquery In Mysql(5)
  7. Creating Profiles In Php/mysql ?(7)
  8. Php Search Engine Script For Mysql Database(11)
  9. Some Mysql Basics(4)
  10. New Found Php Coding Errors(5)
  11. Problem With A Mysql Join(2)
  12. The Artists Tutorials :mysql Basic Commands(0)
  13. Whats Wrong>?(9)
  14. Can Some One Tell Me Whats Wrong With This(2)
  15. [mysql]get Id Of Loged In User?(7)
  1. [mysql/php]need Som Basic Help(13)
  2. [php/mysql]id Trouble [resolved](3)
  3. Mysql Won't Update(5)
  4. Php + Mysql Question!(4)
  5. Tools Needed!(9)
  6. Best Sites For Learning Php-mysql(4)
  7. Fopen Errors :((7)
  8. Php And Mysql Programming(2)
  9. Best Php And Mysql Editor For Noobs(6)
  10. Html Form!(4)
  11. Mysql Error(3)
  12. Create Table - Mysql Code - Help(1)
  13. Gallery Help Needed(10)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 03:58 PM