Solved

phpmyadmin select query returning a blank page.. why?

Posted on 2011-03-01
6
622 Views
Last Modified: 2012-05-11
I have this table in my database that has two columns with over 10,000 rows:

1) ID - int
2) Sessions - mediumtext

When I do a search query like the attached code below, the phpmyadmin page is returning a blank white page. Why is that? How could i fix this? If I do search in the ID column it is returning just fine.

I'm testing on a local machine with XAMPP installed btw.


SELECT * FROM current_session WHERE sessions LIKE '%SESSIONIDHERE_LONGTEXT%'

Open in new window

0
Comment
Question by:Bandai2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 35006204
The machine may be running out of execution time or memory. Check the apache error logs
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 35006215
Try adding LIMIT 5 to the query string and see if you get 5 results.  Then make it LIMIT 100, then LIMIT 1000, etc.  Your query has to read all of the text in the "Sessions" column and do some rather intense processing.  If the LIMIT statements work, then I'm expecting that your script may be timing out.  If the LIMIT statements return nothing, then you might want to check character encoding or something like that - a test case that you know for sure works would be helpful.
0
 

Author Comment

by:Bandai2
ID: 35006353
bportlock,

I've already increased the execution time and memory allocated to PHP.


Ray Paseur,

I've tried the limit to 5 results and it showed the results, but if I changed it to 10 or more it is displaying the white blank page again. How could I fix this timeout issue?

0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
LVL 3

Expert Comment

by:pius_babbun
ID: 35006496
Try to execute the Query with php code mysql_query($query) where $query contains your actual query and you can use mysql_error() to get the data base error.Hope it helps
$conn   	= mysql_connect('hostname','db user name', 'db password');
$database	= mysql_select_db('database_name');
$Query  	= "SELECT * FROM current_session WHERE sessions LIKE '%SESSIONIDHERE_LONGTEXT%'";
$Result 	= mysql_query($query) or die('Mysql Error :' .mysql_error());    //SHOW QUERY ERROR

Open in new window

0
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 500 total points
ID: 35006642
If each record does not already have a unique ID code then add one and alter your query from

"SELECT * FROM current_session WHERE sessions LIKE '%SESSIONIDHERE_LONGTEXT%'";

to something more like

"SELECT id FROM current_session WHERE sessions LIKE '%SESSIONIDHERE_LONGTEXT%'";

so that you do not use up large amounts of memory in result sets. You can always retrieve each record on an individual basis using its ID
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 35007356
I second this idea - ID:35006642 - and I would like to suggest that you try it again with the gradually increasing LIMIT clauses.  You may find that this solution works, or you may find that the requirement to do the fulltext table scan is just too much work to complete in a reasonable amount of time.

Do you have fulltext index on the sessions column?  Have you tried EXPLAIN SELECT to see if it has any suggestions for you?
0

Featured Post

Don't Miss ATEN at InfoComm 2017!

Visit booth #2167 to see the  new ATEN VM3200 32 x 32 Modular Matrix Switch. Other highlights include the VE8950 4K HDMI Over IP Extender, VS1912 12-Port DP Video Wall Media Player  and VK2100 ATEN Control System. Register now with Free Pass Code ATEN288!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question