Jump to content

harristweed

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by harristweed

  1. uhhmm

    This displays the correct values:

    <?php
    $temp1=9;
    $temp2=4;
    //$temp1 = $nonRBProducts[$counteri][3];
    $temp1 * 1;
    //$temp2 = $RBProducts[$counterr][3];
    $temp2 *  1;
    $temp3 = $temp1 + $temp2;
    
    echo"temp1 = $temp1<br />temp2 = $temp2<br />temp3 = $temp3<br />";
    ?>

     

    Are you sure the variables $nonRBProducts[$counteri][3]; and $RBProducts[$counterr][3]; contain a value?

     

    And what is the purpose of attempting to multiplying by 1? If that's what you want to do because $temp2 *  1; wont do anything!

  2. Oh yes, doh!

    try changing

    $query = mysql_query("SELECT  AVG(customer_service) FROM rating WHERE cust_id LIKE '$search'"); 

    to

    $query = mysql_query("SELECT  AVG(customer_service) FROM rating WHERE cust_id = '$search' "); 

     

  3. try

    <?php// dont use short tags!!!
    
    //connect to mysql
    //change user and password to your mySQL name and password
    $link_id=mysql_connect("localhost","user","password"); 
        
    //select which database you want to edit
    if (mysql_select_db("voogahco_microblog", $link_id));
    
    
    $search="$id";
    
    //get the mysql and store them in $result
    //change whatevertable to the mysql table you're using
    //change whatevercolumn to the column in the table you want to search
    // Make a MySQL Connection
    
    $query = mysql_query("SELECT  AVG(customer_service) FROM rating WHERE cust_id LIKE '$search'"); 
         
    $result = mysql_query($query) or die(mysql_error());
    
    $row=mysql_fetch_row($result);
    
    $average=$row[0];
    
    echo"average=$average";
    ?>

  4. NOT

    $sql = "INSERT INTO $table SET category='$category', supp_pn='$supp_pn', desc='$desc', $help='help'";
    mysql_query($sql)or die (mysql_error());

    BUT

    $sql="INSERT INTO $table (category, supp_pn, desc, help)VALUES('$category', '$supp_pn', '$desc', '$help' )";

  5. You can't have a variable name that has a space in it!

    you have the ID as a variable

    Why not...

    
    $query_Connectors= sprintf("SELECT * FROM Connectors WHERE Conn_ID = %s",
             mysql_real_escape_string($_GET['EquipID']));

  6. this is the first error

    $query_Connectors = "SELECT * FROM Connectors WHERE Conn_ID = %s", GetSQLValueString($colname_Standard Connector, "int"));

     

    Space in variable name $colname_Standard Connector

     

    and same error furter down.....

×
×
  • 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.