General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 21st, 2005, 02:36 PM
Helmer Helmer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 14 Helmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 7 m 59 sec
Reputation Power: 0
parse error, unexpected T_ECHO - please help

Parse error: parse error, unexpected T_ECHO in /customers/helmers-lucky.net/helmers-lucky.net/httpd.www/Vwar/try.php on line 10



[Code Begin]

<?php

mysql_connect('localhost, helmers_lucky_n, 7fBeQucB') or die(mysql_error());
mysql_select_db(helmers_lucky_n) or die(mysql_error());

$result = mysql_result(mysql_query('SELECT * '
. ' FROM `vwarVwar_member` '
. ' WHERE `status` =3 LIMIT 0, 30'

echo $result ; ?>

[Code End]

Reply With Quote
  #2  
Old August 21st, 2005, 02:39 PM
Helmer Helmer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 14 Helmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 7 m 59 sec
Reputation Power: 0
woops forgot to tell whats wrong..

I am trying to pull all the members with status 3 out on a list..

and then i get the parse error

Reply With Quote
  #3  
Old August 21st, 2005, 04:30 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 552 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 1 m 33 sec
Reputation Power: 13
parse error

I have seen this happen occasionally when I "copy and paste" code. If you look closely you will see that vwarVwar_member and status are in back-ticks instead of quotes.

Reply With Quote
  #4  
Old August 22nd, 2005, 06:00 AM
MichaelSoft MichaelSoft is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Location: The Netherlands
Posts: 120 MichaelSoft User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 20 sec
Reputation Power: 13
Humm .. the 'back-ticks' are not the problem since it is a MySQL query.

What about closing all brackets ;-)
$result = mysql_result(mysql_query('SELECT * '
. ' FROM `vwarVwar_member` '
. ' WHERE `status` =3 LIMIT 0, 30' ) ) ;

Reply With Quote
  #5  
Old August 22nd, 2005, 08:03 AM
Helmer Helmer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 14 Helmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 7 m 59 sec
Reputation Power: 0
hmmm new error ?

Hi again..

Thanx for the closing bracets.. didnt even see that one..

But now i comes with another error...

Warning: mysql_connect(): Unknown MySQL Server Host 'localhost, helmers_lucky_n, 7fBeQucB' (3) in /customers/helmers-lucky.net/helmers-lucky.net/httpd.www/Vwar/try.php on line 3


[Code]

<?php

mysql_connect('localhost, helmers_lucky_n, 7fBeQucB') or die(mysql_error());
mysql_select_db(helmers_lucky_n) or die(mysql_error());

echo "<br><B>TRY STATUS:</B> ";

$result = mysql_result(mysql_query('SELECT * '
. ' FROM `vwarVwar_member` '
. ' WHERE `status` =3 LIMIT 0, 30' ) ) ;

echo " $result "; ?>

[Code]

Reply With Quote
  #6  
Old August 23rd, 2005, 04:57 AM
MichaelSoft MichaelSoft is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Location: The Netherlands
Posts: 120 MichaelSoft User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 20 sec
Reputation Power: 13
Hello,

You must split the host, username and password as seperate strings:

mysql_connect('localhost', 'helmers_lucky_n', '7fBeQucB') or die(mysql_error());
Comments on this post
Viper_SB agrees!

Reply With Quote
  #7  
Old August 23rd, 2005, 01:33 PM
Helmer Helmer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 14 Helmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 7 m 59 sec
Reputation Power: 0
damn..

You are right off course ...

i think i might need a break from this programming...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > parse error, unexpected T_ECHO - please help


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap