Jump to content

Yesideez

Members
  • Posts

    2,334
  • Joined

  • Last visited

    Never

About Yesideez

  • Birthday 10/19/1973

Contact Methods

  • Website URL
    http://www.pictureinthesky.net

Profile Information

  • Gender
    Male
  • Location
    Devon, UK

Yesideez's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Take a look at PHPMailer. http://phpmailer.worxware.com/ It's free to download and use and is fairly simple to set up, should be what you're looking for.
  2. You can use Javascript to hide the submit button as soon as it is clicked. Just a thought.
  3. Just remembered - some land line numbers in smaller villages are still only 5 digits so where mobile numbers will always be 11 digits, land line (01) numbers can be either 10 or 11 digits. 01xxxxxxxx or 01xxxxxxxxx or 07xxxxxxxxx
  4. I've got a site where users can make posts and I need to check for the presence of phone numbers. Phone numbers can either be 01xxxxxxxxx or 07xxxxxxxxx depending on land line or mobile (total of 11 digits). I think the easiest way to check is to strip out any non-numeric character (can this be done with regex?) which will bring all numbers together, then check with a much simpler regex. I need an if() to check for the presence of either number and return true or false. Big problem is, I've tried to learn this (wasted many hours) and can't get my head around it. Any help would be gratefully appreciated.
  5. A friend has a company on which he currently has a database in MS Access 2007 which is shared on his local network in the office. When he designed and created the database he didn't link two main tables together and now it's grown to over 12,000 records he's asked me to take a look at it. I've successfully converted the data over to MySQL although we're unsure my code has auto linked all the data together that should be so this will require some time in itself. The reason I've emigrated it to MySQL is because there's some things he's asked me to do for him like generate PDF files on the fly of properties when desired and other stuff where PHP is ideal. Ideally he'd like to keep his database running on MS Access because he knows how to edit this (very much still a beginner although he's much better than I am) and he wants to make sure he'll not become unstuck in the future if his database needs attention and I'm not around - him learning PHP/MySQL/HTML is not an option. I've heard PHP can talk to a MS Access database but I've no idea where to start with this - I have dyspraxia so learning how this could be done might take a very long time. He'd also like to give clients a login so they can view/progress info on their properties and logins for his staff so they can view their stuff. All this I can do but the initial problem is his database. It only has two tables, one listing all his customers and the second listing all the work carried out. Although all properties relate to data in the work table not all work can relate back as some work would be a one-off job. What I'd like to know please is how would you tackle this?
  6. I thought this was going to be a pig. The option of only limiting certain words isn't really possible due to the nature of the site. I did think of trying soundex but then, splitting a subject string into separate words then calculating soundex for each and comparing was again a bit off as soundex values aren't unique and, well, soundex values are strings so we're back to square one. Tricky. I think this idea will be binned.
  7. Without any type of help regarding what it is you want to achieve it's pretty difficult but if your "id" field is set to AUTO_INCREMENT then it might not return anythign as AI starts counting at 1 and never 0. If you want to return the total you can use this instead: $total = mysql_query("SELECT COUNT(*) AS total FROM comments WHERE id=0"); $row=mysgl_fetch_assoc($total); echo $row['total']." Clicks\n"; If you're not wanting the SUM() then try TOTAL() but not sure entire what it is you're wanting to do.
  8. I've got a site where people can place posts and I'm wanting to implement a system where users can have up to 5 words in a watch list. When someone makes a post and uses one of these watch words I'd like to fire off an email to whoever has placed a match word in their watch list informing them of the post. Only problem is, I've no idea which is the best way to do this. The database can potentially grow very big and I'm not happy using a LIKE or a stripos() as I'd like to keep the routine optimised as much as possible to help save resources. If there isn't any simple way of doing this then I'll knock it on the head. The watch list will be used on a VARCHAR(40) which is kind of like a subject string.
  9. You're right - well spotted I had no need to access that table in this call and no idea why I tried adding it. EDIT: I also removed GROUP BY as it wasn't needed. What is needed is some sleep ><
  10. I think I'm far too tired. I removed the line joining the users table and it works perfectly.
  11. SELECT i.*,tp.x,tp.y FROM items AS i INNER JOIN users AS u ON u.postcode=sp.outcode INNER JOIN postcodes AS sp ON sp.outcode='EX8' INNER JOIN postcodes AS tp ON tp.outcode=i.outcode WHERE ((tp.x<(sp.x+16093.44) AND tp.x>(sp.x-16093.44)) AND (tp.y<(sp.y+16093.44) AND tp.y>(sp.y-16093.44))) AND i.description LIKE '%apple%' GROUP BY i.id ORDER BY i.added DESC The error I get is "#1054 - Unknown column 'sp.outcode' in 'on clause'" Any idea on how I can get around this please?
  12. I did try this: SELECT u.userid,u.username,z.active,z.idle FROM users AS u LEFT JOIN onlinetime AS t ON u.userid=t.userid LEFT JOIN (SELECT userid,SUM(active) AS active,SUM(idle) AS idle FROM onlinetime) AS z ON u.userid=z.userid Doesn't work Tried this as well to no avail: SELECT u.userid,u.username,z.active,z.idle FROM users AS u LEFT JOIN (SELECT userid,SUM(active) AS active,SUM(idle) AS idle FROM onlinetime) AS z ON u.userid=z.userid ORDER BY z.active DESC LIMIT 20
  13. I've got a couple tables: users; onlinetime The users table contains loads of info including userid, username, activitycount and the onlinetime contains id, userid, date, active, idle. The field userid is what ties both tables together and active and idle are both integers (seconds). Where the users table has one entry per user (as is normal) the onlinetime table can have multiple entries per user. What I need to do is make a query to list all the users who have activity count as 0 and the sum(active) in onlinetime below a certain number, let's say 100. If the onlinetime had only one entry per user I'd be able to write the query but it's the multiple entries in the onlinetime table that's throwing me.
  14. Oh wow is it really that simple? Thank-you for that - really is appreciated!
  15. Hi, I have a page of HTML and inside this page is a TABLE and it's this table I need to extract some data from. <th>Proxy:</th><td><span class="red">Confirmed proxy server.</span> (<a href="/proxy-server">Read about proxy servers</a>)</td> The first TH cell will always have that content but I need to extract everything between the next TD cell including the HTML. I can strip any HTML out myself if present, just needing help with Regex as I have no clue whatsoever about this as I just cannot get my head around it and I've spent hours! Any help with this would be gratefully appreciated.
×
×
  • 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.