0

I have MySQL search query which takes input from drop down values and pass on values to my search query.
This works perfectly on my website.

But the same when I run on my Mobile it does not give me results(blank) as well its not consistent in displaying results, means it works sometime only.

So how is that my query works on website but on mobile behaves different. I am not sure if its query problem or variable which needs to be adapt for mobile.

Index.php page where my search drop down their.
Display_event_nonmember.php where I pass on values as POST to Session.
Display_eventengine_nonmember.php where I fetch values from session variable and display.

Regards,
Ankit Baphna

3
Contributors
8
Replies
40
Views
3 Years
Discussion Span
Last Post by ankit.baphna
1

Unless you include any relevant code, how do you propose that we help you?

0

Hi,
Even I dont know what code should I add here. As I really dont know something which works on my website does not work on mobile browser.

This is my Display_eventengine_nonmember.php

$ecategory  = $_SESSION['varecategory'];
$etype  = $_SESSION['varetype'];
$eproduct  = $_SESSION['vareproduct'];
$epercentage  = $_SESSION['varepercentage'];
$ecity =$_SESSION['ecity'] ;
$edatefrom =$_SESSION['varedatefrom'];
$edateto =$_SESSION['varedateto'];
$orgname =$_SESSION['varorg'];

  $query = 
"SELECT * FROM member M INNER JOIN event E
ON
M.mem_id = E.mem_id
where ecategory like '$ecategory' 
AND etype like '$etype'
AND eproduct like '$eproduct' 
AND epercentage like '$epercentage' 
AND ecity like '$ecity'
AND orgname like '$orgname'
";

Edited by Dani: Formatting fixed

0

I'm afraid this code does not really help. Is it possible that you are sending or receiving a large amount of info?

Is there a lot of javascript processing too?

0

no javascript here.

For cookie what settings do we have to do on our mobile device?

0

As I mentioned the code you supply does not help. Please show how and what data is being sent and how it is used (processed) before retrieving info from the db. Then show how the data is being sent back to the page.

BTW - why is everything in a session? Is this data meant to be persistent for some reason?

0

When I run my search query for product type Interior on website it gives me this result after doing echo for query:

SELECT * FROM member M INNER JOIN event E ON M.mem_id = E.mem_id where ecategory like 'Interior' AND etype like '%' AND eproduct like '%' AND epercentage like '%' AND ecity like '%' AND orgname like '%'

when I run my search query on mobile it gives me this result

SELECT * FROM member M INNER JOIN event E ON M.mem_id = E.mem_id where ecategory like '' AND etype like '' AND eproduct like '' AND epercentage like '' AND ecity like '' AND orgname like ''

This is the reason why on mobile my search is not working. Why % is not working in my mobile browser do you have idea?

From search page I am using this code to take input

<td align="left">Product Category</td>
                        <td>
                        <select id="dropdown_index"   name="varecategory">
                              <?php $result= mysql_query('SELECT DISTINCT ecategory FROM event E INNER JOIN member M'); 
                            ?>
                            <?php 
                            while($row= mysql_fetch_array($result)) 
                            { 
                            echo "<OPTION VALUE='".$row[0]."'>".$row[0]."</OPTION>";
                            }
                            ?>
                              <option value='%' selected>ALL</option>
                        </select>   </td>

I am passing "Varecategory" value via POST to second page and accepting in session variable.

Then I am passing this session variable to third page and accepting in a variable.

Then I am using this variable in my search query.

Regards,
Ankit Baphna

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.