We help IT Professionals succeed at work.
Get Started

function parameters and mysql select

asaidi
asaidi asked
on
399 Views
Last Modified: 2012-08-16
Hi
i m passing parametrs via a function with the user choice:
if (empty($netw) && !empty($_POST['client'])){
  if(count($pulse1)==4){
         include('full.php');  
         p5($date,$date2,$report,$client=$client,null);
        
   }  

}
if (empty($client) && ($netw<>"")){
 
  if(count($pulse1)==4){
         include('full.php');  
         p5($date,$date2,$report,null,$netw=$netw);
        
   }  
}
if (empty($netw) && empty($client)){
   
   if(count($pulse1)==4){
      include('full.php');  
        p5($date,$date2,$report,null,null);
        
  }

Open in new window

i can see all the parameters in full.php
but on my select they are not getting the infos i want
full.php
<?php
 
function p5($v1,$v2,$v3,$v4,$v5){  
$auto=$_GET['auto'];
echo $a, PHP_EOL;
	echo $v1, PHP_EOL;
	echo $v2, PHP_EOL;
	echo $v3, PHP_EOL;
	echo $v4, PHP_EOL;
        echo $v5, PHP_EOL;

     $result1=mysql_query("SELECT unit_serial,DATE(tran_date)as datei,customer_no,pulse_channel 
        from count_transactions  
          WHERE DATE(tran_date) BETWEEN '$v1' AND '$v2' and account_no=$auto AND customer_no=$v4 AND unit_serial=$v5  
                              
group by customer_no,unit_serial ") ; 
         $num = mysql_num_rows($result1);

Open in new window

Comment
Watch Question
Most Valuable Expert 2011
Author of the Year 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE