Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1944 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Trying to find an error

Thread title: Trying to find an error
Closed Thread    
    Thread tools Search this thread Display Modes  
11-13-2008, 04:41 PM
#1
developer_x is offline developer_x
Status: Junior Member
Join date: Mar 2005
Location: Copenhagen
Expertise:
Software:
 
Posts: 88
iTrader: 0 / 0%
 

developer_x is on a distinguished road

  Old  Trying to find an error

Hi,

Please see the code block.

PHP Code:
if($_GET['activate_id']!="" && $_GET['email']!="")
{
    
$q="select * from tbl_subscriber_newsletter where email='".$_GET['email']."' and activation_code='".$_GET['activate_id']."'";
    
$r=mysql_query($q); 
When I run the script I have I get this error:


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /****/index.php on line 9
I believe the query has some error. Could some one help me correct the query:

PHP Code:
$q="select * from tbl_subscriber_newsletter where email='".$_GET['email']."' and activation_code='".$_GET['activate_id']."'"

11-13-2008, 05:18 PM
#2
developer_x is offline developer_x
Status: Junior Member
Join date: Mar 2005
Location: Copenhagen
Expertise:
Software:
 
Posts: 88
iTrader: 0 / 0%
 

developer_x is on a distinguished road

  Old

I have fixed the error. No error in the code. The database access info had problems.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed