Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Can't find exactly what you've been wanting? Try searching for what you are looking for in the search box to the right. ----------->


This forum is now closed and has moved to a new location! Click here to find out why.
Pages: [1] 2

AuthorTopic: mysql unexpected ')' in mysql.php error  (Read 1337 times)

Jawz

  • Basic Member
  • *
  • Reputation Power: 11
  • Jawz has no influence.
  • Offline Offline
  • Posts: 17
    • View Profile
mysql unexpected ')' in mysql.php error
« on: December 10, 2009, 04:24:37 PM »
i keep getting this error

Parse error: syntax error, unexpected ')' in /home/mafia/public_html/mysql.php on line 3


here is my mysql.php

Code: [Select]
<?php

      $c 
mysql_connect('localhost''root''p1kap1ka',);
    
mysql_select_db ('lite2'$c);
    
$mykey=256573440;

?>

thanks if anyone cold help
Logged

JoshuaDams

  • Active Member
  • **
  • Reputation Power: 129
  • JoshuaDams is working their way up.JoshuaDams is working their way up.JoshuaDams is working their way up.
  • Offline Offline
  • Posts: 240
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Re: mysql unexpected ')' in mysql.php error
« Reply #1 on: December 10, 2009, 07:40:31 PM »
$c = mysql_connect('localhost', 'root', 'p1kap1ka',);

change to

$c = mysql_connect('localhost', 'root', 'p1kap1ka');

Jawz

  • Basic Member
  • *
  • Reputation Power: 11
  • Jawz has no influence.
  • Offline Offline
  • Posts: 17
    • View Profile
Re: mysql unexpected ')' in mysql.php error
« Reply #2 on: December 11, 2009, 12:34:03 PM »
now i get

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/mafia/public_html/mysql.php on line 3

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/mafia/public_html/mysql.php on line 4
Logged

JoshuaDams

  • Active Member
  • **
  • Reputation Power: 129
  • JoshuaDams is working their way up.JoshuaDams is working their way up.JoshuaDams is working their way up.
  • Offline Offline
  • Posts: 240
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Re: mysql unexpected ')' in mysql.php error
« Reply #3 on: December 11, 2009, 01:43:01 PM »
For starters....that has very important info relative to your server :P not something you can or should post up here ;-)

Also, if it's denying access one is going to ask where you got that from as it's not calling to your database it's calling to the person you bought it or downloaded it off of :P

dominion

  • Active Member
  • **
  • Reputation Power: 89
  • dominion barely matters.dominion barely matters.
  • Offline Offline
  • Posts: 129
    • View Profile
    • Email
Re: mysql unexpected ')' in mysql.php error
« Reply #4 on: December 11, 2009, 02:01:47 PM »
i hate to ask a silly thing but have you run the installer.php  ???
Logged

JoshuaDams

  • Active Member
  • **
  • Reputation Power: 129
  • JoshuaDams is working their way up.JoshuaDams is working their way up.JoshuaDams is working their way up.
  • Offline Offline
  • Posts: 240
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Re: mysql unexpected ')' in mysql.php error
« Reply #5 on: December 11, 2009, 02:03:20 PM »
^

No such thing as silly questions only silly answers :P

dominion

  • Active Member
  • **
  • Reputation Power: 89
  • dominion barely matters.dominion barely matters.
  • Offline Offline
  • Posts: 129
    • View Profile
    • Email
Re: mysql unexpected ')' in mysql.php error
« Reply #6 on: December 11, 2009, 02:18:49 PM »
this works with my copy of lite

Code: [Select]
<?php
    $c 
mysql_connect('localhost''root''p1kap1ka');
    
mysql_select_db('lite2'$c);
    
$mykey=256573440;
    
?>


installer.php once ran changes the info to your the error your getting (2nd one) says the db is not there here is a nice little video http://www.youtube.com/watch?v=fk3DSKgbJXQ
« Last Edit: December 11, 2009, 02:26:26 PM by dominion »
Logged

JoshuaDams

  • Active Member
  • **
  • Reputation Power: 129
  • JoshuaDams is working their way up.JoshuaDams is working their way up.JoshuaDams is working their way up.
  • Offline Offline
  • Posts: 240
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Re: mysql unexpected ')' in mysql.php error
« Reply #7 on: December 11, 2009, 02:40:06 PM »
I'll let dom answer that, not familiar with the Lite Version whatsoever >,<

dominion

  • Active Member
  • **
  • Reputation Power: 89
  • dominion barely matters.dominion barely matters.
  • Offline Offline
  • Posts: 129
    • View Profile
    • Email
Re: mysql unexpected ')' in mysql.php error
« Reply #8 on: December 11, 2009, 04:25:29 PM »
I'll let dom answer that, not familiar with the Lite Version whatsoever >,<

he should be fine now turns out it was not lite just a nice way to get around converting
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: mysql unexpected ')' in mysql.php error
« Reply #9 on: December 11, 2009, 04:58:51 PM »
Code: [Select]
<?php
    $c 
mysql_connect('localhost''root''p1kap1ka');
    
mysql_select_db('lite2'$c);
    
$mykey=256573440;
    
?>
isnt that the normal php way.
Logged
Project Choosen - 10%
Daniel - Hanson . Com

dominion

  • Active Member
  • **
  • Reputation Power: 89
  • dominion barely matters.dominion barely matters.
  • Offline Offline
  • Posts: 129
    • View Profile
    • Email
Re: mysql unexpected ')' in mysql.php error
« Reply #10 on: December 12, 2009, 07:17:52 AM »
yes it comes with the lite download
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: mysql unexpected ')' in mysql.php error
« Reply #11 on: December 12, 2009, 08:21:48 AM »
I'll let dom answer that, not familiar with the Lite Version whatsoever >,<
So your saying your only good with the McCraps V2 way? not the PHP way?
Logged
Project Choosen - 10%
Daniel - Hanson . Com

dominion

  • Active Member
  • **
  • Reputation Power: 89
  • dominion barely matters.dominion barely matters.
  • Offline Offline
  • Posts: 129
    • View Profile
    • Email
Re: mysql unexpected ')' in mysql.php error
« Reply #12 on: December 12, 2009, 08:47:25 AM »
I'll let dom answer that, not familiar with the Lite Version whatsoever >,<
So your saying your only good with the McCraps V2 way? not the PHP way?

i thought he was saying he does not know how lite works as it is diffrent from v2 after all he did post the right fix for the mysql.php
Logged

JoshuaDams

  • Active Member
  • **
  • Reputation Power: 129
  • JoshuaDams is working their way up.JoshuaDams is working their way up.JoshuaDams is working their way up.
  • Offline Offline
  • Posts: 240
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Re: mysql unexpected ')' in mysql.php error
« Reply #13 on: December 13, 2009, 05:50:19 AM »
What the above said, I'm just not used to the Lite way ;-)

Not like i didnt fix it just the same, But i've learned my way around V2, can almost do it with my eyes closed :p

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: mysql unexpected ')' in mysql.php error
« Reply #14 on: December 13, 2009, 07:35:38 AM »
The way lite does it, is the way php does it.
Logged
Project Choosen - 10%
Daniel - Hanson . Com
Pages: [1] 2
« previous next »
 


This forum is now closed and has moved to a new location! Click here to find out why.