php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6405 SELECT in 1 row
Submitted: 2000-08-28 13:17 UTC Modified: 2000-08-28 13:58 UTC
From: hejna at inisoft dot cz Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.1pl2 OS: Linux goodlife 2.3.99-pre8 #27 W
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hejna at inisoft dot cz
New email:
PHP Version: OS:

 

 [2000-08-28 13:17 UTC] hejna at inisoft dot cz
Sorry if I did't say about realy bug.
I'm maybe out of reality...

My WebHoster(?) upgrades from PHP3 to PHP4 and finish work:

(PHP3)
$result = mysql_query("SELECT * FROM page WHERE p_FILENAME = "home.php3"
--- return 1 row about page "home.php3"

(PHP4)
$result = mysql_query("SELECT * FROM page WHERE p_FILENAME = "home.php3"
--- return nothing!!!

I must evade it:
$result = mysql_query("SELECT * FROM page WHERE p_FILENAME LIKE "%home.php3%");
--- return 1 row about page "home.php3"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-28 13:55 UTC] sniper@php.net
Write that line like this:

$result = mysql_query
("SELECT * FROM page WHERE p_FILENAME = 'home.php3'");

Note those single quotes around home.php3-string.

--Jani
 [2000-08-28 13:58 UTC] sniper@php.net
Forgot to mention:

Always test your select clauses within mysql command line
sql shell!

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jul 07 12:00:02 2026 UTC