Results 1 to 5 of 5

Thread: PHP & MySQL, need help!

  1. #1
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default PHP & MySQL, need help!

    I am having issues fetching data from the table;

    Basically using a basic register form that sends out the information to the database, I have another tab that states 'view users' but for some reason I am unable to fetch the register information in the 'view user' tab. Also I had made sure to check if the information was being fed in cPanel x, so everything looks just fine there.

    PHP Code:
    "Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/has2314c/public_html/m3/view_users.php on line 78" 

    http://pastebin.com/kUjGVzur < mysqli_connect.php

    http://pastebin.com/1Y7XVdDq < view_users.php



    Line 78:
    PHP Code:
    "$r = @mysqli_query ($dbc$q); // Run the query." 

    Thank you,

    P1nky

  2. #2
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    How about you remove all the @'s from the commands? That way you can get the errors. Your query is failing, thus returning false, which is not accepted by mysqli_fetch_array. You can either check for is_object() or != false.
    There used to be something meaningful here.

  3. #3
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    How about you remove all the @'s from the commands? That way you can get the errors. Your query is failing, thus returning false, which is not accepted by mysqli_fetch_array. You can either check for is_object() or != false.
    I had deleted all the @'s and nothing really changed, just gave me another warning for line 21.










    Competition Requirements:
    • Registered Users & Jr Members ONLY
    • The script cannot consist more than 300 lines
    • NO Plagiarism
    • NO SRL Members
    • You haven't already released the script
    • NO cheating (No partnering up)
      note: You may ask however many questions you want regarding script errors/code help.



    Prize:


    Donators so far:
    [•P1nky •StickToTheScript •grats •The Mayor •cosmasjdz •Nemesis3x






    The 5 Checkpoints


    Below is a quick summary of what you have to consider to pass them successfully


    Technique (/100)

    This relates to what type of loops you have used where, how you found that certain object on the floor, how you detected that door, how you made sure your script was fail safe. It also refers to issues such as whether you should have used DTMs / DDTMs / bitmaps there or not, how you have found an ore/tree/etc., and if you could have done this any better

    Individuality (/100)

    This refers to whether your scripting style is your own or not. The more individual your script is, the better it is for you, because this means you really understand what all of the different procedures / functions / types / methods should be used for. it means you are relying less on other people, and are developing your own style.

    Use of SRL (/100)

    This relates to how well you have used the SRL include. Are you creating custom functions that are already in SRL, or are you using the existing ones in the include. Also, are you using them correctly? There is no point in creating something which is already in the include. Basically this shows how well you have looked through the include before resorting to making it yourself, and it shows your understanding of the include as well.

    Efficiency (/100)

    The more efficient the script is, the better it is. Why constantly write out procedures when you can use a simple repeat instead? Are you using "end else" when needed? Do you have duplicate functions? Are you freeing DTMs / bitmaps after finishing with them? The more efficient your script is, the better it will run, and the easier errors will be to fix when they arise. No more than 300 lines.


    Meeting Requirements (/100)

    How did the script run when we tested it? Did it do what it was asked for? Any problems? As simple as that.

    Credit: The Great 'StarBlaster100'
    "May the SRL Gods be with you!"

  4. #4
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    Quote Originally Posted by P1nky View Post
    I had deleted all the @'s and nothing really changed, just gave me another warning for line 21.
    What's the warning?

  5. #5
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by P1nky View Post
    I had deleted all the @'s and nothing really changed, just gave me another warning for line 21.
    Instead of using "OR die(..." try using:
    Code:
    if (mysqli_connect_errno()) {
        die("Could not connect to MySQL: ".mysqli_connect_error());
    }
    There used to be something meaningful here.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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