Jump to content

Search the Community

Showing results for tags 'error boolean php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi, I am getting this error when I search for a subcatagory, I have uploaded the previous code that links to this script also, any help would be appreciated as i have spent alot of time trying to figure out whats going wrong. Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/marbella/public_html/intranet/getclientsbysource.php on line 99 Found sources. Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/marbella/public_html/intranet/getclientsbysource.php on line 110 <?php include("connex.php"); //get values $source=$_GET['src']; $specific=$_GET['sps']; $status=$_GET['st']; $datefrom=$_GET['df']; $dateto=$_GET['dt']; $clienttype=$_GET['ct']; $inc=1; switch ($status) { case 1: $thestatus="Active"; break; case 2: $thestatus="Slow"; break; case 3: $thestatus="No Response"; break; case 4: $thestatus="Dead"; break; case 5: $thestatus="New"; break; case 9: $thestatus="Hot"; break; case 10: $thestatus="Await Resp"; break; case 11: $thestatus="Sale"; break; case 0: default: $thestatus="All"; $inc=0; break; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body> <h2><? echo $therep; ?> - Client Report</h2> <h3>Showing: <? echo $thestatus; ?> clients<? if ($datefrom) { echo " registered between ".$datefrom." and ".$dateto; } ?>.</h3> <? if($source==99){ //Selected All sources $resultsSQL="SELECT i_leadsource.leadsource, i_clients.clientsourcespecific, count(leadsource) as total FROM `i_clients` INNER JOIN i_leadsource ON i_clients.clientsource=i_leadsource.leadsourceid WHERE clientsource<>''"; }else{ //Selected single source $resultsSQL="SELECT i_leadsource.leadsource, i_clients.clientsourcespecific, count(leadsource) as total FROM `i_clients` INNER JOIN i_leadsource ON i_clients.clientsource=i_leadsource.leadsourceid WHERE clientsource<>'' AND i_leadsource.leadsourceid=".$source; } $isspecific="clientsourcespecific"; if(strpos($specific, ")")>4) { $resultsSQL.=" AND clientsourcespecific IN ".$specific; $isspecific="clientsource"; } if(isset($clienttype) && $clienttype<>0) { $resultsSQL.=" AND clienttype=".$clienttype; } if($inc==1) { $resultsSQL.=" AND clientstatus=".$status; } if($datefrom) { $resultsSQL.=" AND regdate between '".$datefrom."' and '".$dateto."'"; } switch($_GET['or']) { case "2": $resultsSQL.=" GROUP BY ".$isspecific." ORDER BY total;"; break; case "3": if($source==99) { $resultsSQL.=" GROUP BY ".$isspecific." ORDER BY clientsource;"; }else{ $resultsSQL.=" GROUP BY ".$isspecific." ORDER BY clientsourcespecific;"; } break; default: $resultsSQL.=" GROUP BY ".$isspecific." ORDER BY total;"; } $results=mysql_query($resultsSQL,$ent); $x=mysql_num_rows($results); // While start ?> <p>Found <? echo $x; ?> sources.</p> <table cellpadding="2" cellspacing="0" border="0" width="100%"> <tr class="table_head"> <td>Lead Source</td> <td>Specific Source</td> <td>Count</td> </tr> <? while ($fila=mysql_fetch_array($results)) { ?> <tr> <td><? echo $fila['leadsource']; ?></td> <td><? echo $fila['clientsourcespecific']; ?></td> <td><? echo $fila['total']; ?></td> </tr> <? } ?> </table><p> </p> <? mysql_close($ent); ?> </body> </html> clientsbysource.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.