TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-27-2008, 05:45 AM   #1 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default Weird MYSQL that does not make sense!!!!

Ok check this out everyone. I am getting this error and it is really making me angry. Here is the code

PHP Code:
$info mysql_fetch_array(mysql_query("SELECT id,pimp,hoes,condom,medicine,crack,thugs,weed,guests,beer,turn,cash,bank,worth,nrank,occupancy,informant,reserve,rating,streetbike,lowrider,hummer,bus, turnbank,valet,valitem,parking,custrides FROM $tab[pimp] WHERE id='$id' AND rid='$rid';")); 

Everything in that query is correct and is inline with the database. Now For some reason I keep getting that error and I do not know what to do!!!!! Please help me
KingOfTheSouth is offline  
Reply With Quote
Old 12-27-2008, 06:57 AM   #2 (permalink)
The Addict
 
CoryMathews's Avatar
 
Join Date: Nov 2007
Location: USA
Posts: 256
Thanks: 7
CoryMathews is on a distinguished road
Default

; should not be there for 1. if thats not it what does the error say?
CoryMathews is offline  
Reply With Quote
Old 12-27-2008, 06:59 AM   #3 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

it says this

Quote:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home1/clubbink/public_html/streetlords/game_html.php on line 597
KingOfTheSouth is offline  
Reply With Quote
Old 12-27-2008, 07:18 AM   #4 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Your query is failing, therefore retuning false and not a resource identifier hence why mysql_fetch_array is moaning.

PHP Code:

$res 
mysql_query("SELECT id,pimp,hoes,condom,medicine,crack,thugs,weed,guests,beer,turn,cash,bank,worth,nrank,occupancy,informant,reserve,rating,streetbike,lowrider,hummer,bus, turnbank,valet,valitem,parking,custrides FROM $tab[pimp] WHERE id='$id' AND rid='$rid'") or die(mysql_error());
$info mysql_fetch_array($res); 
give that a try.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 12-27-2008, 07:23 AM   #5 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

Hmm that did not work now the stats will not show up... I keep getting this Unknown column 'parking' in 'field list'
KingOfTheSouth is offline  
Reply With Quote
Old 12-27-2008, 08:39 AM   #6 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Well that sounds like the problem to me, add the column to the DB or drop it from the query.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 12-28-2008, 07:54 AM   #7 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

What column would that be?
KingOfTheSouth is offline  
Reply With Quote
Old 12-28-2008, 02:40 PM   #8 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Quote:
I keep getting this Unknown column 'parking' in 'field list'
The column you just said mysql cannot find.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Reply



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

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a MySQL class Andrew General 12 07-14-2009 03:49 PM
How do I make a tree view from MySQL and PHP oscargodson General 3 12-10-2008 02:22 PM
Securing your MySQL Queries with Sprintf Wildhoney General 26 03-18-2008 06:52 PM
MySQL Sell Up Alan @ CIT The Lounge 12 01-17-2008 05:46 PM
Error in connecting to MySQL via PHP EyeDentify MySQL & Databases 0 01-03-2008 01:06 PM


All times are GMT. The time now is 05:15 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design