Jump to content

Philip

Staff Alumni
  • Posts

    4,665
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Philip

  1. Simply add a condition in the where clause: AND id != #
  2. Thats correct, can you take a screenshot? Here's mine: http://img20.imageshack.us/img20/9540/capx.jpg Ahh at the bottom?
  3. I also don't see the lines.
  4. If you're trying to be recursive, you need to use the return value like so: <?php function test($i) { $i++; if ($i == 1) { return test($i); } elseif ($i == 2) { return test($i); } else { return 'Hello world'; } } $return = test(0); echo $return; ?>
  5. This list should help http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html
  6. from is a mysql reserved word, you need to either use backticks (`) around the column name, or ideally change the name of the column all together.
  7. Or, just in a single query: UPDATE table1 join table2 on table1.id=table2.id SET table1.some_val = table2.value Which when applied should look something like (untested of course): UPDATE lockersmaster JOIN lockers ON lockersmaster.id=lockers.masterid SET lockersmaster.timeout = '$timeout', lockersmaster.dateout = '$dateout', lockersmaster.storetimeout = '$storetimeout'
  8. Maybe it is because you're not printing anything to the output? You need to echo/print what you want the user to see.
  9. if ($j < count($sub_directory)) { $return = folder_array($array_depth, $j, $sub_directory, $current_directory); } else { /* Test print the array - WORKING */ print_r($array_depth); /* Return the array */ return $array_depth; } Well, one sets a $return variable, and the other actually returns for the function. Which did you want?
  10. // replace: $price = $price * 1.02; // with: $price = sprintf('%.2f',$price * 1.02);
  11. Use the LIMIT syntax. adding a LIMIT 2 to the end of your query will only return 2 rows:
  12. A comment (--) needs to have a space after the first 2 hyphens. -- -------------------------------------------------------- -- Program Version 3.0.117 IF NOT EXISTS ( SELECT * FROM master.dbo.sysdatabases WHERE name = N 'irishavs_list01' ) CREATE DATABASE [irishavs_list01] USE [irishavs_list01]
  13. I'm not quite sure what you're asking and what you're wanting.... but I use GMail for everything. The filtering/label system makes life so much easier, setting up 5 accounts using POP3 to pull straight to your GMail account, and the ability to use stuff like gmailUsername+keywords@gmail.com to go straight to your inbox (where gmailUsername is your username). For the calendar/contacts you can use Google Sync & user POP or IMAP to download the emails to your phone. Of course, I'm just a fan of Google.
  14. It is unlikely you're going to get a reply here since you are messing with phpBB's functions. Their forum is the best place to place your question, and patiently wait for a reply.
  15. Is the password in the DB hashed (e.g.. did you use md5() when storing it?)
  16. Wouldn't it make sense to have PHP start the sessions then? You call a session var, but sessions aren't started in the script thus it won't work. $_SESSION['uid'] = $row['id'];
  17. You don't have equal signs...... that's whats throwing the parse errors. $username = $_POST['username']; $password = $_POST['password'];
  18. <?php $mysqli = new mysqli("localhost", "user", "password", "user"); if ($mysqli === false) { die("ERROR: Could not connect to database. " . mysqli_connect_error()); } $sql = "SELECT rating from users where username = 'Chris'"; if ($result = $mysqli->query($sql)){ echo "$result"; } else { echo "no results, but here is the error: ",$mysqli->error; } $result->close(); $mysqli->close(); ?>
  19. So what errors are you getting? Like Corbin said, most of those you can just remove the i from mysqli_
  20. I love my HTC phone, even with Windows mobile (I know.... everyone thinks I'm crazy for that) I plan to upgrade mine to a newer model as soon as AT&T allows me to have a discount I just wish there were more free apps for WinMo.
  21. If I'm understanding what you want correctly, yes. Points 1-4 are easily achievable with a database. Point 5, you could always create a dynamic pdf file that has all the client info in it. If you want to use a .doc thats a bit more tricky - I think there are a few classes/extensions that can deal with .doc....
  22. Haha, no problem. We always overlook the smallest of details sometimes
  23. $array['2009-7-30'][0][0] vs $array['2009-07-30'][0][0]
  24. Well, right off the bad, you have something outputting (<font face="Arial">) to the browser before your header function.
×
×
  • 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.