Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
mysql_fetch_row

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
smasher



Joined: 10 Jan 2004
Posts: 229
Location: Zaprešić

PostPosted: 11.07.2004 21:15    Post subject: mysql_fetch_row Add user to your forum ignore list Reply with quote

napravio sam jednu skripticu koja samo vadi podatke iz DB, i konstantno dobivam ovaj error,

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in ...


na lokalnom serveru sve radi normalno, ali na online, ne... molim vas, pomozite !!!

_________________
http://3DHR.net - Srce hrvatskih 3d artista
http://www.Rhino3DHelp.com
Back to top
View user's profile Send private message Visit poster's website
silence



Joined: 24 Apr 2004
Posts: 890
Location: .....ni na nebu, ni na zemlji.....

PostPosted: 11.07.2004 21:25    Post subject: Add user to your forum ignore list Reply with quote

jel bed pokazat cijeli kod?
meni se znalo potkrast takvih gluposti da me sram..danas sam gubio živce jedno 20 minuta i buljio u kod dok nisam vidio da mi fali jedan zarez....kaj je najgore bio sam uvjeren da MORA radit... Embarassed

_________________
This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Back to top
View user's profile Send private message Visit poster's website
_butch



Joined: 10 Sep 2003
Posts: 870
Location: Maichno, Krlovc

PostPosted: 11.07.2004 21:28    Post subject: Add user to your forum ignore list Reply with quote

probaj sa ovim
Code:

$sql = mysql_query("select  COUNT( * ) as count from  tvoja_tablica");

$r = mysql_fetch_array($sql);

$count = $r['count'];

_________________
FRENCH GUARD: No chance, English bed-wetting types.
I burst my pimples at you and call your door-opening request a silly thing, you tiny-brained wipers of other people's bottoms!
Flikrac
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
smasher



Joined: 10 Jan 2004
Posts: 229
Location: Zaprešić

PostPosted: 11.07.2004 21:38    Post subject: Add user to your forum ignore list Reply with quote

Quote:
echo "Online: ";
$qr0 = mysql_query("SELECT id, member_name, member_id, member_group, in_forum, in_topic FROM ibf_sessions order by id DESC");
while(list($id, $member, $memberid, $group, $inforum, $intopic) = mysql_fetch_row($qr0)){
echo "<a href=\"forum/index.php?showuser=$memberid\">$member</a> ";

}


to je jedna od četri querija. Al nijedan ne radi..
zarez i te spike nisu, jer bi onda isto prikazivalo grešku i OFFLINE... probat ću sa fetch_array....

_________________
http://3DHR.net - Srce hrvatskih 3d artista
http://www.Rhino3DHelp.com
Back to top
View user's profile Send private message Visit poster's website
silence



Joined: 24 Apr 2004
Posts: 890
Location: .....ni na nebu, ni na zemlji.....

PostPosted: 11.07.2004 21:43    Post subject: Add user to your forum ignore list Reply with quote

a....mysql_connect() i mysql_select_db() ?
da ti nije ostalo na localhostu i lokalnim varijablama?

_________________
This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Back to top
View user's profile Send private message Visit poster's website
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 11.07.2004 21:46    Post subject: Add user to your forum ignore list Reply with quote

tablica ti postoji? spojen si na bazu?
probaj
Code:

mysql_query("SELECT id, member_name, member_id, member_group, in_forum, in_topic FROM ibf_sessions order by id DESC") or die ("greska:".mysql_error());



pa vidi sta mysql kaze di je konkretno err

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
smasher



Joined: 10 Jan 2004
Posts: 229
Location: Zaprešić

PostPosted: 11.07.2004 22:06    Post subject: Add user to your forum ignore list Reply with quote

jel bi ovo mogo bit problem:
ja sam cijeli taj kod sejvo u .php datoteku, a zapravo je html, koja u sebi ima 4 <?php ?>.
možda zato što više puta otvaram php??? jer kad stavim samo jedan <?php ?> i jedan query sve radi...

_________________
http://3DHR.net - Srce hrvatskih 3d artista
http://www.Rhino3DHelp.com
Back to top
View user's profile Send private message Visit poster's website
silence



Joined: 24 Apr 2004
Posts: 890
Location: .....ni na nebu, ni na zemlji.....

PostPosted: 11.07.2004 22:12    Post subject: Add user to your forum ignore list Reply with quote

to ti nema veze...možeš otvarat i zatvarat kaj ti padne na pamet ustvari.
primjer:

<img src="elementi/<? echo $_SESSION['jezik']; ?>/gumb-novosti.gif" width="160" height="20"><br>
recimo kad radim web na više jezika, spremim u session koji jezik koristim i to koristim za svaki gumb da mi ovisno o izabranom jeziku vuče iz određenog direktorija....pa ti misli kolko puta uđem-izađem Very Happy

_________________
This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Back to top
View user's profile Send private message Visit poster's website
retro_one



Joined: 16 Sep 2003
Posts: 880
Location: DUBRAVA.

PostPosted: 12.07.2004 11:34    Post subject: Add user to your forum ignore list Reply with quote

Quote:

echo "Online: ";
$qr0 = mysql_query("SELECT id, member_name, member_id, member_group, in_forum, in_topic FROM ibf_sessions order by id DESC");
while(list($id, $member, $memberid, $group, $inforum, $intopic) = mysql_fetch_row($qr0)){
echo "<a href=\"forum/index.php?showuser=$memberid\">$member</a> ";

}


probaj staviti ovako

Code:

while($row = mysql_fetch_array($qr0))
{
echo  "<a href=\"forum/index.php?showuser=".$row['memberid']."\">".$row['member']."</a>  ";

_________________
Just your average eccentric programmer.
Back to top
View user's profile Send private message
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 12.07.2004 11:56    Post subject: Add user to your forum ignore list Reply with quote

mysql_fetch_row/array javljaju taj error kad nisi spojen na bazu. pogledaj kao sto ti je che rekao - dal si spojen na bazu koja je online.
Back to top
View user's profile Send private message
smasher



Joined: 10 Jan 2004
Posts: 229
Location: Zaprešić

PostPosted: 15.07.2004 15:08    Post subject: Add user to your forum ignore list Reply with quote

hvala ljudi... ispostavilo se da je ipak to da se nije spojio na bazu. naime ja sam to radio za frenda koji mi očito nije dao točne podatke vezane uz bazu podataka... isprobao sam to na svom serveru i radi, al na njegovom ne... hehe.

_________________
http://3DHR.net - Srce hrvatskih 3d artista
http://www.Rhino3DHelp.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group