PHP Classes

mysql insert

Recommend this page to a friend!

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

  1. mysql insert   Reply   Report abuse  
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.


  2. Re: mysql insert   Reply   Report abuse  
Radu Topala - 2007-03-24 16:33:24 - In reply to message 1 from Anthony
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']')".

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