Jump to content

harristweed

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by harristweed

  1. Sorry, can't type.... $query2 = "SELECT * FROM performancecriteria WHERE project_id = $project AND year = 2010 AND ( type = 1 OR type = 2 )";
  2. $query2 = "SELECT * FROM performancecriteria WHERE project_id = $project AND year = 2010 AND ( type = 1 OR type + 2 )";
  3. 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!
  4. 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' ");
  5. what is line 27?
  6. 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"; ?>
  7. try $file_name = trim($_FILES['file']['name']);// original name of file Then echo $file_name;
  8. Hi, No I don't know.... but I put the question to Google and got loads of stuff http://www.adrogen.com/blog/email-not-sending-to-same-domain/
  9. If The script works on your server but not on their server, it must be a server issue. (The script works on my apache 2 / php5). Open a support ticket!
  10. ok, try $columns = 0; $columnsCounter = 2; echo "<table border='1'> <tr>"; while ($row = mysql_fetch_array($products)) { echo "<td>" . $row['title']. "<br> </td>"; $columns++; if ($columns == $columnsCounter) { echo "</tr><tr>"; $columns == 0; } } echo "</tr></table>";
  11. at first glance you have a brace too many echo " </td>"; $columns++; if ($columns == $columnsCounter) { echo "</tr><tr>"; } $columns == 0; } should be echo " </td>"; $columns++; if ($columns == $columnsCounter) { echo "</tr><tr>"; $columns == 0; }
  12. looks like you are adding it twice $add_member = mysql_query($insert); if (!mysql_query($insert,$con)) you have two insert actions
  13. I'm in agreement. Best to have a table that holds the options. Easier to operate than a code for different combinations.
  14. <option value="08" <?PHP IF ($fuel1 == 08) echo "selected"; ?>>Aug</option> 08 is not a number, it's a string Change to <option value="08" <?PHP IF ($fuel1 == "08") echo "selected"; ?>>Aug</option> and it will work
  15. Put each photo with text in to a div and position with CSS http://www.starvillasjavea.com/4_bed_villas.php
  16. You cant have html content before a header call. It will never work. Java Script will do the job for you.
  17. Read the front page of this site!! http://www.phpfreaks.com/tutorial/defining-a-php-function-only-once
  18. desc is a reserved word in MYSQL you need to change the field name.
  19. Lets see the new insert statement
  20. Where are the options coming from? Is the list dynamically generated? Lets see some code.
  21. 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' )";
  22. 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']));
  23. 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.....
  24. I think this will solve it for you... $reference[$name][$this->_levelsNumbering[$i][$name]] =$reference[$name][$this->_levelsNumbering[$i][$name]].$data notice no space before . and $data I had a similar problem.....
×
×
  • 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.