Jump to content

lee_swire

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lee_swire's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks for your help guys!!!! ::) I knew it would be something simple!! It works a treat now!!
  2. Hello, I am new here so please forgive me if this has been posted before, I did use search but couldn't find the answer.  I have processed a form using php and written some of the information to a file on my server.  This is because the users that use this system do not accept cookies, and I have disable session variables. I can read the file no problem, but when defining the variables and trying to use them in my SQL statement I get the following error: Warning: Wrong parameter count for mysql_result() in /www/survey/reports/xml/6.php on line 35 Warning: Wrong parameter count for mysql_result() in /www/survey/reports/xml/6.php on line 40 The PHP code looks like this: Now read from file recently written too*/ $lifecycle = file('../xml_lifecycle.txt'); $from = file('../xml_date_from.txt'); $to = file('../xml_date_to.txt'); echo "$lifecycle[0] | $from[0] | $to[0] "; $from_date = $from[0]; $to_date =  $to[0] ; $life = $lifecycle[0]; // QUESTION 6 START // First get results from DB $sql = 'SELECT count(*) FROM `survey` WHERE `6` = CONVERT( _utf8 \'yes\' USING latin1 ) COLLATE latin1_swedish_ci AND stage = \'$life\' AND date_submitted BETWEEN \'$from_date\' AND \'$to_date\''; $query1 = mysql_query($sql); $yes =  mysql_result($query1); $sql2 = 'SELECT count(*) FROM `survey` WHERE `6` = CONVERT( _utf8 \'no\' USING latin1 ) COLLATE latin1_swedish_ci AND stage = \'$life\' AND date_submitted BETWEEN \'$from_date\' AND \'$to_date\''; $query2 = mysql_query($sql2); $no =  mysql_result($query2); Does anyone have any suggestions on what is going wrong?  I have spent all day trying different things and am really stuck!! Thanks, Lee
×
×
  • 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.