User Profile

Collapse

Profile Sidebar

Collapse
subu
subu
Last Activity: Apr 11 '07, 03:33 PM
Joined: Mar 30 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • subu
    replied to php mysql query returning empty set
    in PHP
    thanks for the help
    See more | Go to post

    Leave a comment:


  • subu
    replied to php mysql query returning empty set
    in PHP
    its a web form with a sequence of questions (output power being one of them)....if the user chooses a certain value (eg:0-25 W), then i include it in my query and filter the results based on 0-25 W...if user chooses N/A, then i return all results...the following code works:
    if ((($OutputPower == '0-25 W') ||($OutputPower == '25-50 W'))
    {
    $sql = "SELECT * FROM $tname1 WHERE `Output Power` = '$OutputPower'" .(($ICSupply...
    See more | Go to post

    Leave a comment:


  • subu
    replied to php mysql query returning empty set
    in PHP
    not quite...followi ng is the query when OutputPower == N/A:

    sql = "SELECT * FROM $tname1 WHERE 1"

    when i run this query directly on the database through phpMyAdmin, it returns all the rows, which is what should be happening.......
    See more | Go to post

    Leave a comment:


  • subu
    started a topic php mysql query returning empty set
    in PHP

    php mysql query returning empty set

    the following query is returning an empty set and i am not sure why:

    if (($OutputPower == '75') || ($OutputPower == 'N/A'))
    {
    sql = Select * from $Tname1 WHERE 1".(($OutputPow er != 'N/A') ? "AND `Output Power` = '$OutputPower'" : "" );

    so essentially it includes Output Power in the query as long as the user did not enter N/A.

    it works fine if i just have:
    sql...
    See more | Go to post
No activity results to display
Show More
Working...