Login   Register  
PHP Classes
elePHPant
Icontem

mysql insert

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Spider Engine  >  All threads  >  mysql insert  >  (Un) Subscribe thread alerts  
Subject:mysql insert
Summary:how to insert into mysql?
Messages:3
Author:Anthony
Date:2007-03-24 13:39:34
Update:2007-03-24 17:43:32
 

  1. mysql insert   Reply   Report abuse  
Picture of Anthony
Anthony
2007-03-24 13:39:34
I just want to say this is a great class! I am using it to spider a web directory, I would like to insert the returned results into a mysql database, can you explain how to do this? Thanks so much, just need an example.

Regards

  2. Re: mysql insert   Reply   Report abuse  
Picture of Radu Topala
Radu Topala
2007-03-24 16:33:24 - In reply to message 1 from Anthony
Hello,
All you got to do is enter an INSERT query into the class's processData() function. Instead of printing it to screen the $pattern_matches, you can do whatever you want with it.
sql eg.:
$sql="INSERT INTO table (name,title,date) VALUES('$pattern_matches[0]['name']','$pattern_matches[0]['title']','$pattern_matches[0]['date']')".
ETC.

  3. Re: mysql insert   Reply   Report abuse  
Picture of Anthony
Anthony
2007-03-24 17:43:32 - In reply to message 2 from Radu Topala
very cool! you are a php master hehe