Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 7
 Click Here to See the Profile for jasonc Click here to Send jasonc a Private Message Find more posts by jasonc Add jasonc to your buddy list

jasonc




quote this post edit post

jasonc is offline IP Loged report this post

Old Post  06-01-06 - 12:50 PM  
i am getting the error

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 7

please can smoeone tell me where i might be going wrong?

thanks

<?
include("dbconfig.php");

//get reg code
$findstring = trim($_GET[s]);
if ($findstring != "") {

//find reg code in memberslist
$res = mysql_query("SELECT code FROM users WHERE code='$findstring' LIMIT 1"
);

if (mysql_num_rows($res) == 1) {
$res = mysql_query("UPDATE users SET code = 'done', password = 'catanddog' W
HERE code='$findstring' LIMIT 1");
//upto here all is ok.

$res = mysql_query( "SELECT email FROM users WHERE code='$findstring' LIMIT 
1" ) or die ( mysql_error() );
// the line above is almost the same as the request near the top of this cod
e, eccept that it now looks for the email field not the code field.

$email = mysql_result( $res, 0 ) or die( mysql_error() );
echo('a.'.$email.'.a');
$res = mysql_query("INSERT INTO anothertable (email, field1, field2) VALUES 
('$email', '', '')");
?>
<p>Thank you for completing you registration process.</p>
<?
} else {
?>
<p>Sorry but this is an illegal action.</p>
<?
}

}
mysql_close;
?>


and this is my database entry.



CREATE TABLE `users` (
`code` varchar(32) NOT NULL default '',
`email` varchar(40) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- 
-- Dumping data for table `users`
-- 

INSERT INTO `users` VALUES ('123', 'someone@domain.com');


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 05:52 AM. Post New Thread   
  Previous Last Thread   Next Thread next
Dreamweaver archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top