SolveErrors
MYSQL

Select finding no data

9 views

I think I must have the settings for mysql wrong. I am using mysql 5 with php4 on apache on a windows xp computer.

My problem is that I am creating a blog using dreamweaver. I create a recordset from a database and bind it to the page. Then, when i want to display some of the data from the record set, i do select etc and end up with something like this:

SELECT blg_article_art.id_art, blg_topic_top.id_top, blg_topic_top.title_top, blg_article_art.title_art, blg_article_art.description_art, blg_article_art.date_art, blg_article_art.text_art
FROM (blg_topic_top LEFT JOIN blg_article_art ON blg_article_art.idtop_art=blg_topic_top.id_top)
WHERE blg_article_art.id_art=id_art
ORDER BY blg_article_art.id_art ASC, blg_article_art.date_art DESC

Now the url parameter (WHERE blg_article_art.id_art=id_art) has a default value of -1 but when I test the statement I get no data found. If i change the default value to 0 or a positive integer then one of the records is found but only one. I am trying to get it to display a single article from from a set of articles based on the is of the article.

I have tried this with another database and get the same thing which makes me think either I have mysql set up incorrectly (although it works for all the other record sets that do not have -1) or I am very, very thick.

Sorry for the length of this.

Any miracles would be greatly appreciated.

Regards

Sean

More MYSQL fixes

Mysql DumpingMySQL resourcesNeed help understanding error messageItalian Characters are stored as "?" in the database.How to pull a list....convert the query mssql database to mysql database