Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Like Ken mentioned, we need to see some of your code. But here is a pseudo version: You would have to go through each record and do an Insert for each one, which may take a while depending on the size of your DB. // Query $pieces = explode(" ", $row['FullName']); SET FirstName = '$pieces[0]' SET LastName = '$pieces[1]'
  2. Yes, but we don't know how you link the articles/items, w/e it is, so it's impossible to tell you what the URL should look like.
  3. EDIT: There you go. --^
  4. Yeah, those 2 things would help too...
  5. If you used or die(mysql_error()) you would have gotten an error for this. You need single quotes around the POST value you want to compare the column to. Try: $result = mysql_query( "SELECT * FROM category.catname WHERE catname='{$_POST['category']}' );
  6. You have an extra closing parenthesis.
  7. Check out the sticky at the top of this board: http://www.phpfreaks.com/forums/index.php/topic,210428.0.html
  8. Good to hear, but what do you mean small input value in your form? P.S. - You can mark the thread solved. There is a SOLVED tab at the bottom of the thread.
  9. OK well, that creates the string properly, I tested it myself. Can I see some more of the relevant code, specifically the sql block.
  10. Please don't post your entire code. You only need to post the relevant code and if people need more they will ask. You need to have you UPDATE like this: SET resultspo = resultspo + $newpo
  11. Yes, it would be RSS. Have a look here: Custom PHP RSS. Or you can just Google it...
  12. There may be some sort of migrating tool because I think (most definitely) the table structure is different. What exactly is the feature you're looking for? The phpBB community may have a mod for that. If not, you should go the php-nuke forums and ask there on how to migrate from phpBB to php-nuke. GL.
  13. Your query is only returning 1 row, so we would need to see the surrounding code where it loops. You may be able to just use DISTINCT rather then a loop. Again, we would need to see some more code.
  14. Please examine the proper syntax for an INSERT statement.
  15. Good analogy, in fact, frameworks are just that, tools. There is no 1 right tool for all jobs. There are benchmark tests and other various performance tests out there, don't really know of any off the top of my head though :-\
  16. This was probably more of a PHP question because you have to manipulate the strings a bit. You also have to check whether or not there's a condition so you know whether or not to use WHERE or AND. Try something like this: $set = FALSE; $query = "SELECT * FROM table_name"; if (!empty($name)) { $query .= " WHERE name = '$name'"; $set = TRUE; } if (!empty($address)) { $query .= ($set===TRUE ? " AND" : " WHERE") . " address = '$address'"; $set = TRUE; } if (!empty($country)) { $query .= ($set===TRUE ? " AND" : " WHERE") . " country = '$country'"; }
  17. $rows1 = mysql_num_rows($result1);
  18. You could probably loop through the $_POST array, but what does the get_post_meta() method look like?
  19. I agree with Netbeans, but Eclipse is also one of my favorites. They are pretty similar.
  20. I don't know why switching that condition would resolve those errors.... So everything works properly now?
  21. Mchl is most likely correct, but show more of the surrounding code.
  22. Whatever $whatever is... If you change your code a little bit you can see exactly what the query is: $sql = "UPDATE tbl_athensPhoto SET photo = '$_file_name' WHERE whatever = '$whatever'"; echo "QUERY: " . $sql; mysql_query($sql); You were also missing a single quote after $whatever in your query. (I also formatted a little bit)
  23. Try changing this line: $name[$counter] = $file; And take away the '@' symbol, that's meant to suppress errors and right now we want to see them.
  24. I don't understand what the pattern is there....
×
×
  • 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.