You are not logged in.

wcf.regNote.message

Cheatman

Beginner

  • "Cheatman" started this thread

Posts: 1

  • Send private message

1

Sunday, January 25th 2004, 8:28pm

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource

Ich krieg immer den Fehler:

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/www/web40/html/test1.php on line 33

und dr Code ist:

PHP Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php 
  mysql_connect("xxx","xxx","xxx");
  mysql_select_db("xxx");
$first $HTTP_GET_VARS['$first']; 
$last $first 5$select "SELECT * FROM gi_cms_news ORDER BY id LIMIT ".$first.",".$last.""$selected mysql_query("$select"); 
$first $first 5; 
while($row mysql_fetch_object($selected)) 
{ 
$stamp date("d.m.Y - H:i",$row->ID); 
print "Titel: ".$row->Titel."<br>"; 
print "geschrieben von <b>".$row->Autor."</b> am <b>".$stamp."</b><br>"; 
print "<br>".$row->Text."<br><br>"; 
} 
?>

Prometheus

Administrator

Posts: 3,278

  • Send private message

2

Sunday, January 25th 2004, 8:35pm

ohne weitere angaben zu haben hier mal ein vorschlag:

ändere:

PHP Source code

1
while($row mysql_fetch_object($selected))

in

PHP Source code

1
while($row mysql_fetch_array($selected))


mysql_fetch_object ist mir nicht geläufig deswegen weiß ich nicht was der befehl machen soll aber das was du da auslesen willst in die variable "$row" ist ein array deshalb mysql_fetch_array
Jedwege Anfragen bitte an Technomausi oder ShaoKhan richten. Dieses Konto ist und bleibt inaktiv.

wcf.user.socialbookmarks.titel