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

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.

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.