SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Enthusiast daliren's Avatar
    Join Date
    Oct 2001
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    while loop returning error in MYSQL

    I am stumped as to why this isn't working. The table cell displays this error message:

    Supplied argument is not a valid MySQl result resourse in ~/mydoc line ***

    Here's the code: it works in other places, why not here?

    <td rowspan="4" valign="top" align="left" width="350"><fieldset><legend>
    Licenses/legend>
    <!-- get list of licenses from database -->
    <?php
    $license = mysql_query("Select ID, Name from License");
    while ($lic = mysql_fetch_array($license)) {
    $id = $lic["ID"];
    $type = htmlspecialchars($lic["Name"]);
    echo("<input type='checkbox' name='ltypes[]' value='$id'>$type");
    } ?></fieldset>
    </td>
    cheers,

    Darren Cassidy

  2. #2
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you connected to the database?
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  3. #3
    SitePoint Enthusiast daliren's Avatar
    Join Date
    Oct 2001
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    bingo

    I thought I was, but once I stuck another connect command right in front of my query, bingo!
    cheers,

    Darren Cassidy

  4. #4
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: bingo

    Originally posted by daliren
    I thought I was, but once I stuck another connect command right in front of my query, bingo!
    Glad I could help... the amount of posts here are intimidating.. I have had an account here for some time.. just to afraid to post heh...


    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  5. #5
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea, sitepoint is a popular site.
    i just fish through the stuff i (think) i know and answer
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  6. #6
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Defender1
    Yea, sitepoint is a popular site.
    i just fish through the stuff i (think) i know and answer
    Im normally reading there articles

    Or emailing Kevin Yank, to ask him question, which let me tell you, Him and Matt were both great people to talk to, as well as a HUGE HELP!

    Thanks you guys
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  7. #7
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've only seen kevin around the forums 3 times
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  8. #8
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Defender1
    I've only seen kevin around the forums 3 times
    That's why i used email
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  9. #9
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Defender1
    I've only seen kevin around the forums 3 times
    He used to pop in every other night or so and would answer quite a few questions. Must be busy working on another book!
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  10. #10
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or an article for the site
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  11. #11
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by RKuhle

    He used to pop in every other night or so and would answer quite a few questions. Must be busy working on another book!

    Let's hope so.. ohh wait.. NOOO! I haven't orderd my copy of the first one yet...

    /me wacks head against wall repeatedly
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •