Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-14-2010, 09:37 PM Error: Expected ;
Skilled Talker

Posts: 97
Name: rhoda
Trades: 0
Good day!

I encountered an error at line 26, error: expected ';'

I can't see what is the cuase of that error.

I attached my codes.

Thank you
Attached Files
File Type: txt cmain6.txt (5.3 KB, 2 views)
newphpcoder is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-15-2010, 04:10 AM Re: Error: Expected ;
Gakoyu Ojima's Avatar
Skilled Talker

Posts: 59
Location: Netherlands.
Trades: 0
At line 26:
PHP Code:
if(mysql_num_rows($result_no) > )
            
$clicking_input 0;
            
$clicking_total 0
Unlike the rest, you forgot to use curly brackets as to wrap the code (which should be executed). Considering you didn't use these, it expects you to end the commands by using a semicolon at the end. Using the curly brackets should fix it. Not to mention, even if you would not use curly brackets and have two conditions or multiple, it would execute both - so also the second statement - regardless of being true or false.

Try the following (or wherever execution should end of the if condition):

PHP Code:
if(mysql_num_rows($result_no) > ) {
            
$clicking_input 0;
            
$clicking_total 0;

Also, why do you have a semicolon at line 106? You would tell it "if $totalrows > 1, do nothing" as you stop the execution of the code that is beneath it (within the wrapped curly brackets).

PHP Code:
if($totalrows 1); 
__________________
$gocore = new gakoyucore();
$con = mysql_connect($gocore->server, $gocore->username, $gocore->password) or die(mysql_error());

Last edited by Gakoyu Ojima; 12-15-2010 at 04:16 AM..
Gakoyu Ojima is offline
Reply With Quote
View Public Profile
 
Old 12-16-2010, 04:21 AM Re: Error: Expected ;
Banned

Posts: 1
Name: Rohit Rana
Trades: 0
if(mysql_num_rows($result_no) > 0 )
{
$clicking_input = 0;
$clicking_total = 0;}
rohitkkrana is offline
Reply With Quote
View Public Profile Visit rohitkkrana's homepage!
 
Reply     « Reply to Error: Expected ;
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11648 seconds with 13 queries