How Do You Check Mysql Info, And Act According To It's Content?

free web hosting
Free Web Hosting, No Ads > General > Hosted Members Area

How Do You Check Mysql Info, And Act According To It's Content?

gameratheart
As part of a web-game on my site, I have a php form that requires people to enter their username, and information about the characters they want to have in the game. All this information is stored into a MySQL table. I want the players to be able to visit a page where every character they have registered with their username can be seen.

My question is simply, how can I check the values of the MySQL data, and act accordingly? What I need to do is check for a Username and a character number, and if it finds it, takes the data in that part and acts on it, eg. by showing the picture of the character and the information they gave about it.

Does anyone know how I can do this?

Reply

ghostrider
You can do this by counting the number of user names and then using a select query. I can help you out with this if you want.

Reply

gameratheart
Well I was kind of thinking, use a select query that searches for the username and the character number, then somehow use the selected data. If you can help me with this, ghostrider, it would be much appreciated.

Reply

MaineFishing45
So you want a page that displays the SQL information (its values) into something graphical? So pretty much you want a Profile or Registered users page?

Umn.... give me some time to reseach that, but in the mean time ask GhostRider. Also if you want to find the values, just login to Cpanel and find PHPMyAdmin and that should tell you.

Reply

gameratheart
Well... in effect it is a profile page, because it is a page showing what a user has, but it isn't really talking about the user.

QUOTE
Also if you want to find the values, just login to Cpanel and find PHPMyAdmin and that should tell you.

Talk about stating the bloody obvious! (Sorry, that was uncalled for, but I think I've already demonstarted that I know how to get MYSQL data - I just don't know how to use it)

Reply

rvalkass
Your best option will be to write a select query for all rows featuring the current logged-in user's name. The use mysql_fetch_array to get an array of data. If you use a while loop to cycle through the array you can print out the character number or whatever, or use the data as variables to look up an image or other information. I can help as well if you want, either via PM, email or IM (check my profile). I use MySQL a lot and have a few examples of how to use mysql_fetch_array.

Reply

gameratheart
The more help I get, the better. You're methods are making sense, but I can't seem to put two and two together and come up with something productive.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : check, mysql, info, act, content

  1. Mysql Database Not Working
    (3)
  2. Cms/upload Best Practice?
    New to using content management, seeking advice. (9)
    Other than my aborted attempt at setting up a site on my previous free web host, this will be the
    first time that I have set up a dynamic website with an SQL back end. I came from the Internet
    stone-age of static sites with lots of graphics and text, but little or no interactivity. I would
    really appreciate some advice on how best to do this. I have selected the free Content Management
    System called Lanius CMS , which is made by the makers of the more well-known package called Drake
    CMS. Also, at the advice of many of the denizens of the Trap17 forums, I have downloade....
  3. It Went Well For A While
    MySQL problem back in all its glory. (5)
    Some time ago I had a stubborn problem when trying to access one of the interactive pages on my
    website and getting the following error: QUOTE Warning: fopen() : open_basedir restriction in
    effect. File(include/errors.xml) is not within the allowed path(s):
    (/home/mrdee:/usr/lib/php:/usr/local/lib/php:/tmp) in
    /home/mrdee/public_html/admin/include/commonfunctions.php on line 682 Warning:
    fopen(include/errors.xml) : failed to open stream: Operation not permitted in
    /home/mrdee/public_html/admin/include/commonfunctions.php on line 682 Cannot open XML data file:
    incl....
  4. Regarding Content Language...
    (6)
    Hello, I'm sorry to bother you all again... I've read the TOS and I'm having second
    thoughts about the "site must be in English" rule. I was thinking about having some Portuguese stuff
    there (because I am portuguese, and sometimes I create portuguese content)... Would there be any
    problem? If in doubt, I could of course translate content for further analysis by the
    administration... The main site would remain in English, of course.. I know you created the rule to
    prevent illegal content... however, I'd really like to have at least some things in portugu....
  5. How Do I Find My Mysql Password? [resolved]
    Cannot access my MySQL (5)
    After all the recent problems, my account has been restored. I have setup my parked domain agin, and
    that works fine. However, I can no longer access my MySQL databases (I can from PHPMyAdmin, but
    that's all). I had to create a new user for my databases, and created the user with exactly the
    same username and password I had before, but some of my web pages do not let me access the pages I
    have associated with my databases. Where could i find out what my DB password is? (Although I am as
    good as sure I am using the right one). I have tried my old password, the new c....
  6. Remote Access Mysql
    (8)
    Is it possible to directly access my local database from my website? For example, if somebody
    submits info on my website, the info they submitted would be transferred to my local database
    directly. Is that possible? And if so, how do I set that up? The reason I don't want to upload
    my database to my subdomain is because it would be difficult to keep the website database and my
    local database in sync . . . or is there a way to do that? Thanks for any replies.....
  7. Reset My Site Pelase
    read for more info (6)
    Can you just reset my cpanel / website FTP and all to how it was when I got it new please? Don't
    change any passwords, just make it so it's like brand new again. thanks --why? because I have
    some files in public_HTML that I am trying to delete even after I give it 777 it says permission
    denied so please reset /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
    alt="smile.gif" />....
  8. Sections And Content
    Help please? (3)
    I do not know how to edit the content and add more pages to my website. Can somebody please help me?....
  9. My Website Is Down [resolved]
    ramansingla.info (4)
    Hi, My website is down. Domain: ramansingla.info I am certain that it's a problem from your
    end as I have checked this from multiple online servers that my site isn't accessible. I
    haven't changed anything. All of a sudden it was no where.....
  10. Question About The Upgrade And The Mysql Usage ?
    question about the upgrade and the mysql usage? (3)
    thanks for the upgrade but i do have question about it QUOTE Domain name zam.trap17.com
    Hosting package Beta Subdomains 3 / 99 Parked Domains 0 / 9 Addon Domains 3 / 9 Mysql databases
    1 / 99 PostgreSQL Databases 0 / 99 Disk usage 14.25 / 500.00 MB MySQL Disk usage 0.82 MB
    Disk space available 485.75 MB Bandwidth (this month) 6.59 / 10240 MB Email accounts: 1 / 99
    Email forwarders: 1 / unlimited Autoresponders: 0 / unlimited Email filters 0 / unlimited
    Mailing lists: 0 / 99 FTP accounts 3 / 99 1-Bandwidth (this month) 6.59 / 10240 MB ....
  11. Content Management System (cms)
    What CMS to choose... (10)
    I just looked at my remaing credits and it was only 1, so i remembered what I needed to find out. I
    need a CMS for my website! I have tried lots of CMS(s) and have had very little luck. I would
    like to know some CMS(s) that you would reccommend me to use. Some I have tried: CT2 CMS 2.0 beta
    Joomla EazyPortal and some others, I can't remember It needs the following: Themes avaliable
    Able to be hosted here Business Looking (ie; very formal) No Ad(s) Free for non-commercial use Forum
    Registration for members Administrator Please post some CMs(s) names in t....
  12. Question About Adding Message Board To Site
    Using mysql? (5)
    Hi, Super simple question from a simple laddie! Is a MySql database a messageboard? If not
    how can I set up a messageboard. Thanks. std split from another topic ....
  13. Homepage Has Trap17 Info On It [resolved]
    Sorry, I didn't see this anywhere. (3)
    I'm sorry if this is already in the FAQs and Readme, but I didn't see it there. My question
    is, why does my homepage still have Trap's info on it after I edited index.html? I put my
    weblayout code in the edit section and Trap's info still shows. Does this have something to do
    with the propagation? http://www.starlite-way.com Thanks.....
  14. Phpbb2.17 Mysql Problems
    Just this week they started (4)
    The forum has been up and running for about a year and a half. It has been through numerous server
    upgrades, etc, including the recent HDD change, but for some reason, just this week it started
    throwing this error: QUOTE Could not obtain post/user information. DEBUG MODE
    SQL Error : 145 Table './jlhaslip_phpbb2/phpbb_posts_text' is marked as crashed and should
    be repaired SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email,
    u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail,....
  15. 99 Mysql Databases?
    (2)
    I just got my account, and I was wondering: do we really get 99 MySql databases? I've read a
    lot of the stuff about it, and it sounded like we only get one database, but my cPanel says that I
    have "0 / 99" databases. If it's lying, it's not really a problem, because I could always
    just prefix my tables, but I was just wondering why it would say that. If for some reason it was
    letting me get more than one database, and I wasn't supposed to, I don't want to get my
    account deleted. Does anyone know why it says that? /huh.gif" style="vertical-align:m....
  16. Mysql Access Error[resolved]
    (5)
    The MySQL server is Down, please look into this soon. I'm with Trap17 for nearly an year but
    never faced any issues witht the free hosting so far, but his is the first time I'm facing this.
    Please kindly look into this.....
  17. Mysql Server Problems [resolved]
    (3)
    hello, well since i installed php-nuke on my site's dir i have seen quite a lot of mysql SERVER
    ERRORS, like that the server is going down so now and often is it due to my cms or is the server
    having some probs ? this is what i just saw from the statistics: QUOTE Service Status
    named up spamd up imap up cpsrvd up pop up eximstats failed syslogd up clamd failed mysql
    (5.0.27-standard) failed httpd (1.3.37 (Unix)) up exim () failed exim-26 up ftpd failed Server
    Load 16.50 (1 cpu) quote tags added. please use quote tags as needed. review trap17....
  18. Cpanel And Mysql Problem. [resolved]
    (3)
    hi all - i'm going to make this brief. my CMS (drupal 5.0) and forum (SMF 1.1.1) cannot connect
    to the mysql db. however their files CAN still be accessed. I also tried uploading a file through an
    ftp client and the file could be accessed. HOWEVER: cpanel cannot be accessed either. it simply
    loads with a blank page. however both worked earlier today. so is there a problem with the server?
    and if there is, will it be fixed?....
  19. Sites Disapeard, Mysql Errors? Also Server Folders Deleted
    (18)
    Hello its 15:40 and I login see if everything runs oke, and I see numerus things deleted my mysql is
    working again. Whats going on? My Webpage couple websites got deleted, and server folder files now
    whats going on? /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> my
    forum also give errors but mysql db stil there /sad.gif" style="vertical-align:middle" emoid=":("
    border="0" alt="sad.gif" />.......
  20. The Difference Between Mysql And Postgresql ?
    (4)
    I found those two in cPanel and they loofed nearly the same as each other but what is the difference
    ? I tried to go to phpMyAdmin and phpPgAdmin and they are nearly the same too. Do you know that ?
    Please reply , thanks a lot.....
  21. Mysql Backup Cronjob
    How to? : / (6)
    Well, I want basically a cron job that will run and backup my MySQL database. I've been told
    in the shoutbox that you can do it via cron job. Didn't told me how. Now, I just want help on
    how to do it and what commands I should put in the cPanel. ....
  22. I Can Not Create Mysql Databases In Control Panel Using Phpmyadmin
    Phpmyadmin says i don't have permissions to create databases (3)
    I went to phpmyadmin script a few minutes ago and i could not create a database. Since it says
    there on my control panel that i have unlimited mysql databases, plus i am using only a couple of
    databases, please respond and fix this, please.....
  23. Is It Possible To Access The Mysql Remotely?
    (10)
    I like to experiment with a lot of things and I was thinking of making a sort of instant messenger
    in Python, but I want to let people have actual accounts so I need to be able to access the mySQL
    remotely. If that's not possible, are we allowed to run Python scripts on the server?....
  24. Does Trap17 keep back-ups of my MySQL Databases?
    (6)
    ok, well i screwed up yes i admit it i screwed up big time... anywho, umm i was wondering is
    trap17 kept back-ups of the MySQL Databases??? and if they do would it be possible for me to get a
    copy of the backup for my forums sent to me somehow? because stupid me, i was re-installing my
    forums, and went to make a backup of my MySQL database jsut in case, and selected all and hit make
    backup, and well it only made a backup of only one of the databses, so right now i am without the
    many posts i had ten minutes ago so if you so keep backups thats awsome!! youv....
  25. How To Crate Mysql Database?
    urgent help (7)
    Hi everyone!
    I'm trying to make in my site a page system that allows me to create users
    account (with a foto for every user)...
    I'm doing that in PHP, I learned all I have to
    know about PHP and MY SQL. I know how to make new array and querries in the data base, only 1 think
    is messing: ....
  26. Mysql?
    (15)
    My board has a mySQL error on it and when i went to cpanel it says for mySQL databases /99 instead
    of 1/99 or 0/99. I tried making new one but it didn't appear after i created it /unsure.gif"
    style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" />....
  27. Mysql Version4.0.27
    mysql version is old (2)
    I have came to my control cpanel,And I saw the mysql version,It is old,and with this version we
    don't have to install into computer before use it,that is the way make it to hard to use to me
    when I try to use it on my computer.So I want to ask you,Admin.Do you plan to upgrade mysql to
    higher version like mysql 5.1.?If yes,please do it as soon as posible.Because right now i'm
    using mysql 5.1 and I don't know how to use mysql 4.0.27. Otherwise,can I upload my exist
    database to my account. I don't know how to create it in my account.It is so hard for me be....
  28. Mysql Database Problem
    appears to be deleted, but still has data (6)
    Hello. My Mysql databases appear to have been removed off of my account, yet according to my
    cpanel, space is still being used on databases. Hopefully I haven't lost any of my data,
    because I haven't taken a backup after recent updates, but If I have, I'll have to make do
    with previous backup. Any idea what's wrong? Here's a quote from my cpanel QUOTE
    Mysql databases 0 / 99 PostgreSQL Databases 0 / 99 Disk usage 13.16 / 150.00 MB SQL
    Disk usage 2.99 MB As you can see, my database data still appears to be on the system, b....
  29. Installing Apache, Mysql, Phpmyadmin Locally
    Solving the "php_mbstring.dll missing" (5)
    Since Trap17's CP provide the individual site's owner with goodies like MySql and
    PhpMyAdmin, chances are some will want to make use of them. Well, it's fine enough to get that
    on one's host (Gee! Thanks a lot, Trap17...) Knowing how the usual geek react, it might be
    expected that most people considering to make use of a database on their site will want to do most
    of the tedious job of developing and testing on their own local system before sending the wrapped-up
    result on their domain/subdomain. This involves four basic steps (sorry for the compuwi....
  30. Mysql Database Setup : Setting Up Mysql Database
    Guide to use MySQL database in your site (6)
    A SMALL INTRODUCTION TO DATABASE ============================= I have seen that many members have
    problems with Database. Here is a small INFO which should give you the IDEA. mySQL is a DATABASE
    server. You can access it using the link in Cpanel. Cpanel can be accessed by
    "www.YOUR-SITE.com/Cpanel" There you have 4 Main Options :- 1> CREATE A DATABASE 2> CREATE A USER
    3> ADD USER TO DATABASE 4> PHPMYADMIN CREATE : IT ALLOWS YOU TO CREATE A DATABASE CREATE USER
    : IT ALLOWS YOU TO CREATE A USER. USING THIS, YOU CAN ACCESS THE DATABASE. A DATABASE CANNOT BE....

    1. Looking for check, mysql, info, act, content

Searching Video's for check, mysql, info, act, content
Similar
Mysql
Database Not
Working
Cms/upload
Best
Practice? -
New to using
content
management,
seeking
advice.
It Went Well
For A While
- MySQL
problem back
in all its
glory.
Regarding
Content
Language...
How Do I
Find My
Mysql
Password?
[resolved] -
Cannot
access my
MySQL
Remote
Access Mysql
Reset My
Site Pelase
- read for
more info
Sections And
Content -
Help please?
My Website
Is Down
[resolved] -
ramansingla.
info
Question
About The
Upgrade And
The Mysql
Usage ? -
question
about the
upgrade and
the mysql
usage?
Content
Management
System (cms)
- What CMS
to choose...
Question
About Adding
Message
Board To
Site - Using
mysql?
Homepage Has
Trap17 Info
On It
[resolved] -
Sorry, I
didn't
see this
anywhere.
Phpbb2.17
Mysql
Problems -
Just this
week they
started
99 Mysql
Databases?
Mysql Access
Error[resolv
ed]
Mysql Server
Problems
[resolved]
Cpanel And
Mysql
Problem.
[resolved]
Sites
Disapeard,
Mysql
Errors? Also
Server
Folders
Deleted
The
Difference
Between
Mysql And
Postgresql ?
Mysql Backup
Cronjob -
How to? : /
I Can Not
Create Mysql
Databases In
Control
Panel Using
Phpmyadmin -
Phpmyadmin
says i
don't
have
permissions
to create
databases
Is It
Possible To
Access The
Mysql
Remotely?
Does Trap17
keep
back-ups of
my MySQL
Databases?
How To Crate
Mysql
Database? -
urgent help
Mysql?
Mysql
Version4.0.2
7 - mysql
version is
old
Mysql
Database
Problem -
appears to
be deleted,
but still
has data
Installing
Apache,
Mysql,
Phpmyadmin
Locally -
Solving the
"php_mb
string.dll
missing"
;
Mysql
Database
Setup :
Setting Up
Mysql
Database -
Guide to use
MySQL
database in
your site
advertisement



How Do You Check Mysql Info, And Act According To It's Content?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE