Jump to content

[SOLVED] MYSQL ERROR: Unknown column 'example_title' in 'where clause'


cl4im3r

Recommended Posts

Hi, Thnx for your time, very much appreciated.

 

First of all, i should explain that, the result i'm trying to achieve, is to change a URL from originally looking like this...

 

site.com/article.php?id_art=155

 

And make it look like this...

 

site.com/article.php?title_art=example_title

 

Here is the mysql for the original "id_art" result. (copied & pasted from dreamweaver)

 

SELECT *

FROM blg_article_art INNER JOIN blg_topic_top ON idtop_art=id_top

WHERE id_art = colname

 

name: colname

DefaultValue: -1

Run-TimeValue: $_GET['id_art']

 

This code worked correctly. But when i changed it to this "title_art" version...

 

SELECT *

FROM blg_article_art INNER JOIN blg_topic_top ON idtop_art=id_top

WHERE title_art = colname

 

name: colname

DefaultValue: -1

Run-TimeValue: $_GET['title_art']

 

It doesnt work, and when i click on a link which for example say's.. site.com/article.php?title_art=example_title

 

I recieve the following SQL Error: Unknown column 'example_title' in 'where clause'

 

I am completely at a loss, racking my brain, as to what i need to change. I've also tried changing the "Default Value" from -1 to Null. But still no results.

 

Does anyone have some sought of idea, as to what is going wrong?

 

Thnx alot

 

Dan

Link to comment
Share on other sites

Thnx for your reply, i'm not a techy, so i'll  answer the best i can.

 

The actual Column name is 'Title_art'

'Example Title' is just one of my rows, within the 'title_art' Column.

 

'title art' is certainly in my database, aswell as the particular row named 'Example Title'.

 

As for what Script i'm using, are u reffering to "innoDB"? I'm sorry i'm just a pitiful designer. If you could give me an example of some scripts, i'm sure i can answer that.

 

WHERE title_art = colname

 

name: colname

DefaultValue: -1

Run-TimeValue: $_GET['title_art']

 

As you can see, for default value, i've written -1. But my title_art column is not numeric, could there possibly be something else i should put there instead?

 

Thnx for your patience.

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.