Jump to content

Search the Community

Showing results for tags 'triggers'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. I’m trying to create a trigger that does two things, first take an ip that’s in dot notation and run inet_aton on it and put the result in another field. Second, checks a lookup table to identify an ip range that the result of the first action falls into and enters the id of that row in the table. This is on a mysql database on my web host. Here’s what I’ve tried: DELIMITER // CREATE TRIGGER before_ins_download BEFORE INSERT ON download FOR EACH ROW begin set new.ip_address = inet_aton(new.`ADDRESS`), new.refer=(select `id` from `ip_lookup` as i where new.ip_address between i.start and i.end limit 1 ); END; // DELIMITER ; It works without the new.refer part but after I added that it just seems to hang and never gets to the closing DELIMITER; . All ip columns are indexed. Does anyone see a mistake in my code? Thanks for looking.
  2. I have set up a Trigger... update a_players p join wp_terms t set p.wpID = t.term_id where t.slug = p.wpSlug ...and it works. These are relatively new data tables, and I had intended on the trigger to just deal with new entries (as Tags posted via WordPress). However, it ended up updating previously applicable rows, which didn't anticipate. It makes sense, but before I go live, I'm going create term_id / wpID matches for all previous rows. As of now, wp_terms is just 42 rows, but it will grow a great deal once the site actually goes live. a_players currently has 150 rows but it going to approach about 1,000 rows before I go live, growing around 250 rows per year. Should I narrow my trigger down? If I should narrow it down to just deal with new entries, what do I need to add? If It's going to check every row in both tables, will that bog down my site? Thank you.
×
×
  • 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.