Query works fine in phpmyadmin returns 0 rows when ran from php?

From the manual on rawurldecode() : Note: rawurldecode() does not decode plus symbols ('+') into spaces. Urldecode() does if you output your mySQL query, I bet your strting will look something like this: 1+. New+England+(Northeast+region) try urldecode() as the manual entry suggests.

From the manual on rawurldecode(): Note: rawurldecode() does not decode plus symbols ('+') into spaces. Urldecode() does. If you output your mySQL query, I bet your strting will look something like this: 1+.

New+England+(Northeast+region) try urldecode() as the manual entry suggests.

Ah, this led me to the ultimate cause. For some reason my posts were replacing the period with underscores, so I told php to urlencode the string and furthermore do a str_replace('. ','.',$str) to fix the period.

Problem is I didn't decode the period again so the actual html was showing up as "... AND value = '1 . New England (Northeast reg ...". Grrr, now it works.

Thanks for your help. – DJStroky Feb 9 '10 at 22:14.

You should use single quotes instead of double quotes, ie: SELECT * FROM possible_values WHERE table_id=3 AND col_name='DIVISION' AND value = '1 . New England (Northeast region).

I updated the code, this does not fix the problem. – DJStroky Feb 9 '10 at 21:24.

Double quotes are not allowed for strings in SQL, as they are used for identifiers (like MySQL uses the backtick '`'). I think MySQL allows them for strings with some settings, but you shouldn't use them. Technically that should return an error, so I don't think that's your problem.

What could be your problem is that you're using the old mysql extension, which may not support your mysql version.

I don't think that is it. I'm running MySQL client version: 5.0.51b with PHP Version 5.2.6 and phpMyAdmin - 2.11.7 – DJStroky Feb 9 '10 at 21:27 I remember so many times when people have had problems using the old mysql extension... so why use it? Use mysqli.

– Tor Valamo Feb 9 '10 at 21:29.

Might be a typo, but table_id=$request should have quotes around it: table_id='$request.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions