Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
  • what is best php or html? (In: General Search Engine Optimization)
  • Featured Web Site Template

    Hundreds More at Free Site Templates.com!

    Web Site Partners
    Sponsored Links
    Jet City Software
     
    Whos Here ?
    There are 0 guests and 1 members in the forums right now.
    Reflects user activity within the last 5 minutes
    Moderator(s): Prowler, jcokos
    Member Message

    vculp
    Joined: Mar 30, 2006
    # Posts: 89

    View the profile for vculp Send vculp a private message

    Posted: 2006-Oct-29 17:15
    Edit Message Delete Message Reply to this message

    I am queriying a database and getting no results to the screen but don't understand why. Can someone help?

    Thanks.

    [code]<?php // Query the Database
    $specific_value = '519';


    $result = mysql_query("SELECT * FROM links WHERE area_code = '" . mysql_real_escape_string($specific_value) . "' ORDER BY date DESC");


    echo '<a href="'.$row['url'].'">'.$row['name'].'</a>';




    ?> [code]



    Prowler
    Staff
    Joined: Aug 14, 2000
    # Posts: 1788

    View the profile for Prowler Send Prowler a private message

    Posted: 2006-Oct-30 08:13
    Edit Message Delete Message Reply to this message

    As I see it you should get something like this:
    Fatal error: Call to undefined function: mysql_real_escape_string() in path-to-your-script

    Assuming that the function you are calling is not defined.

    Check your PHP installation by sticking the following in a file and call it from your browser:


    Code: [copy]





    That will show you plenty of information about your server and PHP specifically.




    vculp
    Joined: Mar 30, 2006
    # Posts: 89

    View the profile for vculp Send vculp a private message

    Posted: 2006-Oct-30 12:49
    Edit Message Delete Message Reply to this message

    The php installation is fine. I just don't understand what I am doing wrong here. (Sorry ... I'm new to PHP.)



    thomson2
    Joined: Oct 24, 2006
    # Posts: 7

    View the profile for thomson2 Send thomson2 a private message

    Posted: 2006-Oct-31 09:39
    Edit Message Delete Message Reply to this message

    Uh, you're not connected to your database to begin with, which will throw an error. Your query won't run, 'cause PHP isn't finding your DB in the first place. Check your MySQL stuff to see if your getting a response at all. Then comment your queries to see which one is causing problems, if any.


    You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
    1. You have not yet logged in, or registered properly as a member
    2. You are a member, but no longer have posting rights.
    3. This is a private forum, for which you do not have permissions.

    If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

    If you cannot find this message, click here to Re-Send it.

    If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

    Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

    New posts Forum is locked
    © 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions