Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gandalf458

    Cannot get php to parse

    If you have both Apache and IIS running there may well be some conflict between to two. I'm not a number, I'm a free man
  2. gandalf458

    HTML LINK ON IPHONE

    Not sure how this relates to PHP? I'm not a number, I'm a free man
  3. gandalf458

    Trying to find is a null is True False

    The mysql_* functions were deprecated some years ago and don't even exist in the latest version of PHP. It is better to use mysqli_* or PDO. I'm not a number, I'm a free man
  4. gandalf458

    Newbie Python (CGI) question

    Hi Feheke That's just the kind of feedback I was hoping for. Many thanks I'm not a number, I'm a free man
  5. gandalf458

    Migrate website from PHP 5.3 to 5.5

    There's a migration guide at http://php.net/migration55 for upgrading 5.4 to 5.5 and another for upgrading 5.3 to 5.4. These may help you find what to look for. I'm not a number, I'm a free man
  6. gandalf458

    Newbie Python (CGI) question

    Hi. I'm new to Python, trying to teach myself. I have the following script which works fine but I'm wondering if there are better ways of doing some things. print("Content-type:text/html\r\n") import cgi, cgitb form = cgi.FieldStorage() # Get data from form fields # text fields tname =...
  7. gandalf458

    SELECT single record

    Many thanks for explaining. I'm not a number, I'm a free man
  8. gandalf458

    SELECT single record

    Thanks for your reply. Is using fethcAll() and a foreach loop really more efficient than fetch() and no foreach loop? It sounds counter-intuitive. I'm not a number, I'm a free man
  9. gandalf458

    SELECT single record

    Okay. Dimwit that I am, this seems to do the job: $query = 'SELECT * FROM talks WHERE id=:id;'; $stmt = $db->prepare($query); $stmt->bindValue(':id', $id); $stmt->execute(); $result = $stmt->fetch(); $address = $result['address']; $num_views = $result['num_views']; I'm not a number, I'm a...
  10. gandalf458

    SELECT single record

    I'm using SQLite and I have the following to get a single record: $query = 'SELECT * FROM talks WHERE id=:id;'; $stmt = $db->prepare($query); $stmt->bindValue(':id', $id); $stmt->execute(); $result = $stmt->fetchAll(); foreach ( $result as $row ) { $address = $row['address']; $num_views =...
  11. gandalf458

    Resizing image with same aspect ratio

    Thanks spamjim. I'm not a number, I'm a free man
  12. gandalf458

    Resizing image with same aspect ratio

    I have a script that uploads and if necessary resizes an image. It works fine except that if the uploaded image is not the same aspect ratio as the source image it gets distorted. Can anyone help me work out what I need to add to change the aspect ratio please? $image =...
  13. gandalf458

    SQLite count rows in table

    Great - many thanks. I'm not a number, I'm a free man
  14. gandalf458

    SQLite count rows in table

    I've tried $query = 'SELECT count(*) FROM talks;'; $result = $db->query($query); which I assume is much the same thing? But then I need to get the value out of $result! I'm not a number, I'm a free man
  15. gandalf458

    SQLite count rows in table

    I simply want to count the number of rows in a table. I have: $query = 'SELECT count(*) FROM talks;'; but then how do I get the result of the select? I'm using PDO. Thanks
  16. gandalf458

    Building a dynamic SQL statement based on contents of an array

    Hi Chris, should that be: <?php if (condition) { write something to the string or do nothing } else { write "OR" to the string followed by something else } ?> I'm not a number, I'm a free man
  17. gandalf458

    SEO-friendly URLs and .htaccess

    Thanks Chris. And yes I'm never quite sure what constitutes "good" SEO. Design a site for humans.
  18. gandalf458

    SEO-friendly URLs and .htaccess

    I have a website with SEO-friendly URLs (for example, contact-us rather than contact-us.php) I have the following commands in my .htaccess file which directs all the pages correctly. RewriteEngine on RewriteRule ^([-A-Za-z0-9]+)$ $1.php [PT,L] I would also like, if possible, to direct...
  19. gandalf458

    is it a problem with my computer,compiler or what ?

    Sounds like you need to read up on formatting!
  20. gandalf458

    Wrinkly trying to get back into Fortran!

    Yes, I think I read in that post that advance="no" was f90/95

Part and Inventory Search

Back
Top