Jump to content

Mysql Query Question.


clanstyles

Recommended Posts

Heres what I have right now:

 

CREATE TABLE `ranks` (

  `id` int(11) NOT NULL auto_increment,

  `rank` varchar(255) NOT NULL,

  PRIMARY KEY  (`id`)

) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

 

And inside a user account table there is a field called rank. It has to support multiple "ranks".

 

How can I retrieve it the best?

 

Thank You

Link to comment
Share on other sites

Warning: implode() [function.implode]: Bad arguments. in xxxxxxxxxxxxxxxxxxx/page.login.php on line 37

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

 

Theres the error :D

 

Link to comment
Share on other sites

Warning: implode() [function.implode]: Bad arguments. in /xxxxxxxxxxxxxxxxxxxxxxxxxxxx/page.login.php on line 37

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

 

stil :(

Link to comment
Share on other sites

I have the Rank but its in an array ...

 

It would help my comprehension of your problem if you explained that with a couple of simple examples of the data that is in your table.  It might even help toward a solution as I get the feeling this thread is careering around chasing shadows at the moment.

Link to comment
Share on other sites

Sorry ill give you all of it hold up:

 


CREATE TABLE `ranks` (
  `id` int(11) NOT NULL auto_increment,
  `rank` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

 

These are the ranks. In the member fields there is a place for "rank" it is going to be the number in ranks. so if 1 = Guest in ranks then

 

if you have 1 rank in youra ccount i need it to print out tha tyou are a guest.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.