PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

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 October 9th, 2005, 04:27 PM
12341234 12341234 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 3 12341234 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 18 sec
Reputation Power: 0
Parse Error

Hi everyone.

Can you help me please??

I am trying to set up search page that when you click on a letter it will display the certain fields that begin with the particlar error.

But i get this error message;
Parse error: parse error, unexpected T_LOGICAL_OR in /home/ps2ma408/public_html/search.php on line 70

If this hasn't expalined it to to you visit www.ps2mayhem.adakist.com, click on PC, PSONE OR PSTWO, then click on any letter.

Thanks

Reply With Quote
  #2  
Old October 9th, 2005, 04:40 PM
12341234 12341234 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 3 12341234 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 18 sec
Reputation Power: 0
hi again,

might help if i post the code where the error occurs.

}

$qlen = strlen($q);

if ($qlen < 1)
{
$per = '%';
}
else
{
$per = '';
}

$sql = "SELECT * FROM games WHERE game_title LIKE '" . $per . mysql_real_escape_string($q) . "%'";

if ($platform && $platform !== '')
{
$sql .= " AND game_platform LIKE '" . $platform . "'";
}

$query = mysql_query($sql);
$count = mysql_num_rows($query);

or die(mysql_error())

$plat = ($platform !== '') ? ' on platform ' . $platform . '.' : '.';

if ($count !== 0)

Reply With Quote
  #3  
Old October 9th, 2005, 04:46 PM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 14
Change

PHP Code:
 $count mysql_num_rows($query);

or die(
mysql_error()) 


to

PHP Code:
 $count mysql_num_rows($query) or die(mysql_error()); 
__________________
"A pawn is the most important piece on the chessboard -- to a pawn"


Reply With Quote
  #4  
Old October 9th, 2005, 05:02 PM
12341234 12341234 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 3 12341234 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 18 sec
Reputation Power: 0
Another error now appears

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/ps2ma408/public_html/search.php on line 68

Reply With Quote
  #5  
Old October 9th, 2005, 05:05 PM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 14
Your query is failing for some reason -- I also just noticed that instead of the mysql_num_rows() call, your 'or die...' bit should be attached to the mysql_query() call -- that will give you more details about what's wrong. It's probably a syntax error. Echoing $sql to see the exact statement being constructed can help.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Parse Error


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