have a prob dont know how to solve - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

have a prob dont know how to solve

Homerun31Homerun31 Posts: 99Member
I am getting an error saying:
Table TEST does not exist.

Heres what I have:
[code]
$query = "SELECT * FROM TEST WHERE ipnum = '$ip'";
[/code]

TEST is a constant that I defined and the value of it is a table that i have. I think for some reason it isnt reading the constants value but its doing TEST instead as the table. i've tried not putting in in parentheses and connecting it with the . but it still doesnt work. any suggestions?

Comments

  • treshrtreshr Posts: 326Member
    Try it like this:
    [code]
    $query = "SELECT * FROM " . TEST . " WHERE ipnum = '$ip'";
    [/code]

    This should do it.

    Good luck,

    --=][tReShR][=--

Sign In or Register to comment.