help please not showing

Started on the old forum in November 2009 · view the original in the archive · old links redirect here

15 replies · 710 views · started 17 years ago · 1 min read

6 participants
brand Senior · 391 posts #1

hi there good coders i have 3 errors on my site in the coding i am recoding my self and garry have looked at this and can not find the error

this is one error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*******/public_html/bank/diposit.php on line 44

 $main.="<b>Welcome to the bank ".getnick_uid($who)."</b><br/><br/>"; 
$gps = mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE id='".getnick_sid($who)."'"));
  $main.="You have $points Points <br/>";

and this is the other errors

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/******/public_html/bank/wdraw.php on line 43

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/bank/wdraw.php on line 45

  $gps = mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE id='".getuid_sid($sid)."'"));
   $main.="<You have $gps[0] Credits in your hand<br/>";
  $gpb = mysql_fetch_array(mysql_query("SELECT bank FROM profiles WHERE id='".getuid_sid($sid)."'"));
   $main.="<and $gpb[0] Plusses in the bank<br/><br/>\n";
 $main.="<form action=\"wdraw.php?sid=$sid\" method=\"post\">\n";

please help coders i am still learning and think i am doing well i am using db

bank int 11 no 0

i am trying to sort out a bank for wapdesire v_2 script and may i say thanks to any good coder that helps me out

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

Mysterio Lead · 630 posts #2

Supplied argument is not a valid mysql resoult resource, means that is unable to get the info from database. Probably, you didnt type correctly the fields of table. Post the table structure here. And i think, getuid_sid($who) is wrong, because as i remember, the $who is the uid of other user. So only use $who, or getuid_sid($sid) if its for you.

mysterio.al - programming is a functional art

crazybrumi Super moderator Principal · 1,064 posts #4

brand wrote: this is one error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*******/public_html/bank/diposit.php on line 44

 $main.="<b>Welcome to the bank ".getnick_uid($who)."</b><br/><br/>"; 
$gps = mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE id='".getnick_sid($who)."'"));
  $main.="You have $points Points <br/>";

first its not id ur searchin in its uid secondly u havt declared the query to $point but in actual fact $gps. to fix this u need to change replace it with whats bellow.

$points = mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE uid='".getnick_sid($who)."'"));
  $main.="You have $points Points <br/>";

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/******/public_html/bank/wdraw.php on line 43

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/bank/wdraw.php on line 45

  $gps = mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE id='".getuid_sid($sid)."'"));
   $main.="<You have $gps[0] Credits in your hand<br/>";
  $gpb = mysql_fetch_array(mysql_query("SELECT bank FROM profiles WHERE id='".getuid_sid($sid)."'"));
   $main.="<and $gpb[0] Plusses in the bank<br/><br/>\n";
 $main.="<form action=\"wdraw.php?sid=$sid\" method=\"post\">\n";

once again u are looking for something that isnt there. replace it with the bellow and it should work

  $gps = mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE uid='".getuid_sid($sid)."'"));
   $main.="<You have $gps[0] Credits in your hand<br/>";
  $gpb = mysql_fetch_array(mysql_query("SELECT bank FROM profiles WHERE uid='".getuid_sid($sid)."'"));
   $main.="<and $gpb[0] Plusses in the bank<br/><br/>\n";
 $main.="<form action=\"wdraw.php?sid=$sid\" method=\"post\">\n";

al these errors should dissapear.

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

crazybrumi Super moderator Principal · 1,064 posts #7

wapmetal wrote: add this in database CALLED 'profile'

points int(11) NOT NULL default '0', bank int(11) NOT NULL default '0',

what why!! it dosnt always mean that they dont exists, it could just be how the query is writtern which in this case is the case. He is using wapdesire v2 so it will be called profiles anyway not profile and points is already in the swl by default all he would have had to add is bank which im sure hes done.

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

coder4u Developer · 76 posts #11

404 not found

Not Found

The requested URL /suspended.page/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.10 Server at deathost.biz Port 80

brand Senior · 391 posts #12

NickGriffin wrote: first its not id ur searchin in its uid secondly u havt declared the query to $point but in actual fact $gps. to fix this u need to change replace it with whats bellow.

$points = mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE uid='".getnick_sid($who)."'"));
  $main.="You have $points Points <br/>";

once again u are looking for something that isnt there. replace it with the bellow and it should work

  $gps = mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE uid='".getuid_sid($sid)."'"));
   $main.="<You have $gps[0] Credits in your hand<br/>";
  $gpb = mysql_fetch_array(mysql_query("SELECT bank FROM profiles WHERE uid='".getuid_sid($sid)."'"));
   $main.="<and $gpb[0] Plusses in the bank<br/><br/>\n";
 $main.="<form action=\"wdraw.php?sid=$sid\" method=\"post\">\n";

al these errors should dissapear.

thanks brumi that got shut of the errors now i got a problem its not showing how many points a user has and when i try and bank some point it dont do any thing here is the coding i have done can any one help me out

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

Attachments: bank.zip
brand Senior · 391 posts #14

NickGriffin wrote: lol the one u done is fukd... giv me the original and al recode it u wna make a transaction without a form lol

this is the one i recoded to make it look like the one above brumi and i think i done well with what i done saying i never recoded much in my hosting life

here is the one befor i recoded it and the image as well mate

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

Attachments: bank.txt bank.gif
brand Senior · 391 posts #16

thanks mate for that i just got one error i got over 2000 points and when i go and put it in the bank it says i not got any points

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close