You are here: Query Problem « PHP Programming Language « IT news, forums, messages
Query Problem

Posted by daksport00 on 06/26/06 19:31

Im not sure if Im posting this in the proper Group, if not, please
direct me to the correct place.

I am working on a website for a gaming league/ladder. I have one
particular line of code that is giving me a hell of an issue.


$mbrguid = (mysql_query(SELECT guid FROM users WHERE id='$inviteid'")
if (is_null($mrbguid)){go into error page}


The table Users has a text field GUID which defaults to a Null. Id is
a numberic player ID which is typed in by the end-user.


All of my SQL knowledge tells me that this code should pull the GUID
field form the Users table based on the ID.


The problem I am having is that when I echo the $mrbguid variable, it
return a value of "Resource ID #19". This value doesn't appear in the
Users table anywhere, let alone in ANY table.


Any suggestions as to what is causing this error, or perhaps a way to
work around this code.


What I am looking to do, is pull the GUID field form the table. If it
is a null or blank value, throw the program into error.


Yes, I know that Null and Blank(empty) are not the same thing, but I
can change the table setup to suit the easier variant.


Thanks


-Dave

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация