Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. You would just include the condition in the WHERE clause so that only the rows you are interested in are selected.
  2. http://dev.mysql.com/doc/refman/5.1/en/example-maximum-column-group-row.html
  3. Have you even determined that your code is reading the source data, at all, or in a timely manor?
  4. The error message is telling you what the problem is, Unknown column 'passwd' ... Do you have a column named passwd in your table?
  5. No your query is failing due to an error. A query that executes successfully but matches zero rows is a successful query and does not produce errors when you access the result set (unless you use mysql_result(), which has the misfortune of producing an error when there are zero rows in the result set.)
  6. Did you ever successfully execute the long query directly using phpmyadmin, with an id value that does not work using php? At this point, I would say your problem is - Perhaps you have some white-space/non-printing characters in some of the data in the columns you are joining on and those columns don't match each other exactly.
  7. Your second query works for me. I recommend that you try again and if necessary fetch the actual table contents after you execute the query to see the changes.
  8. Using strip_tags() on an array produces an error and returns nothing. Are you developing and debugging your code on a system with error_reporting set to E_ALL (or a -1) and display_errors set to ON so that all the php detected errors in your code will be reported and displayed? You will save a TON of time.
  9. Echoing $match_word[$i] inside the foreach() loop WOULD give you that output. What does the following show after the end of the foreach() loop - echo '<pre>',print_r($match_word,true),'</pre>';
  10. Since you are able to echo $row['ID'] and get a value, that means that $row does contain an array (at some point in time.) Either - A) Your page or just that code is being requested/included twice and the second time there is no $_GET['ID'] present and the query matches zero rows, or B) extract() does not like the numeric/associative array that mysql_fetch_array() returns. You can try mysql_fetch_assoc() or why not just use the $row['name'] variables and forget about using extract().
  11. They are already objects and the code that someone posted shows how to access them to echo the values. All you would need to do is change what that code is doing to what you want instead of echoing the values.
  12. You need to use HTML array(s) for your various form fields - http://us3.php.net/manual/en/faq.html.php#faq.html.arrays You can then simply loop through the array data using php array functions, such as foreach(){}
  13. Than that is what is in $_POST['amount22'] or you have some other code you are not showing that is setting $amountToPay to 'amount22' directly. Have you used print_r() on the $_POST array so that you know what you are getting - echo '<pre>',print_r($_POST,true),'</pre>';
  14. After you corrected the syntax error due to the extra quote in Reply #10, what did the query return when executed through phpmyadmin? Edit: And what you do get when you echo $query, because it seems like your $_GET parameter might not contain what you expect. Perhaps you are forming links that have white-space or non-printing characters that would result in a FALSE where term. Edit2: Also, what does var_dump($_GET[iD]); show?
  15. Sounds like your file_get_contents() is not reading anything (I tested with the data that you posted, fixed to make it valid xml.) Are you doing this on a system with error_reporting set to E_ALL (or a -1) and display_errors set to ON so that all the php detected errors would be reported and displayed?
  16. $match_word[$i] exists in the same scope where the foreach(){} loop resides and can be accessed after the end of the foreach(){} loop. You would need to show the full code where you expect $match_word[$i] to exist but it does not.
  17. Specific to your data - <?php $hitlist = file_get_contents($iMobLink."get_hit_list?user_id=".$iStore[2]."&level=10&auth_key=".$iStore[3]); $xml = simplexml_load_string($hitlist); //echo '<pre>',print_r($xml,true),'</pre>'; // view the data foreach($xml->entry as $node){ echo "User id: {$node->target_user->user_id}<br />"; echo "Mob name: ". urldecode($node->target_user->mob_name) . "<br />"; echo "Amount: {$node->amount}<br />"; echo "Time: {$node->placed_time_ago}<br />"; echo "Level: {$node->level}<br /><br />"; } ?>
  18. You need to use an actual xml parser, that would allow you to iterate over the repeated elements - http://us.php.net/simplexml
  19. Actually, I miss read your mysqli_connect(), you are not using a password, but you are listing the database name. The error in your viewBlog.php code is most likely because you are mixing mysqli_ and mysql_ statements and/or it could be because your table name is not blogs and the query is failing.
  20. You need to select a database, either in your mysqli_connect() statement or using a mysqli_select_db() statement.
  21. You can put php variables into an over-all double-quoted string without using concatenation (the dot operator) - $newQuery = "UPDATE ServerList SET UsedSlots='$NewUsedSlots' WHERE ServerNumber='{$row['ServerNumber']}'";
  22. You forgot to show us how you are currently trying to insert the data and what size it is.
  23. The only thing that stands out in the information you have posted is that you are using a non-standard port number, 8888, and EVERY url and every external css/javascript link will need to specify that port number in the url for the site to work correctly. Is there some reason you did not use port 80?
  24. You have at least two logic errors in the code you HAVE posted - if ($country='AU') and if($sizelist && $sizelist='add') You are setting $country equal to 'AU' not testing if it is 'AU' and you are setting $sizelist equal to 'add' not testing if it is 'add' and I suspect that your current problem in the actual code that is using $size and/or $sizes is probably doing the same thing.
  25. The code you just posted does not contain the code displayed in the first post in the thread. How about testing if any php code works. What does the following show when you put it into a file and browse to it - <?php phpinfo(); ?>
×
×
  • 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.