Results 1 to 3 of 3
-
8th Jul 2011, 05:26 PM #1OPMemberWebsite's:
mywallpapergalaxy.cominsert 100 urls to database in one go ?
hello,
could anybody help me with this please.
im trying to add 100 urls (domain url) in to a data base but want to some how do it with one go. ?
so far i am having to insert them one by one and it taking a long time to do.
tables:
Code:url - yes - no
www.domain1.com - 0 - 0
www.domain2.com - 0 - 0
www.domain3.com - 0 - 0
and so on
thanks in advancejack3r Reviewed by jack3r on . insert 100 urls to database in one go ? hello, could anybody help me with this please. im trying to add 100 urls (domain url) in to a data base but want to some how do it with one go. ? so far i am having to insert them one by one and it taking a long time to do. :'( tables: url - yes - no how to insert like so: www.domain1.com - 0 - 0 Rating: 5Booo!! I'm behind you !!
-
8th Jul 2011, 09:52 PM #2Member
Try this
PHP Code:<?php
$db = mysql_connect("localhost", "dblogin", "dbpass");
mysql_select_db("dbname");
$lines = file("links.txt");
foreach($lines as $line)
{
$ins = mysql_query("INSERT INTO table SET url='$line', yes='0', no='0'");
}
mysql_close($db);
?>
-
8th Jul 2011, 10:09 PM #3Member
You must tell how do you keep the url now?
Otherwise, It is difficult to give you the script
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
MySQL insert using PHP Help
By EnCiPh3r in forum Web Development AreaReplies: 9Last Post: 13th Jan 2012, 11:10 PM -
Where can I insert this code?
By Divvy in forum WordpressReplies: 7Last Post: 21st Oct 2011, 10:29 AM -
insert PSD file
By iobit in forum vBulletinReplies: 10Last Post: 9th Aug 2011, 08:38 AM -
Insert Image Code
By warezboy in forum vBulletinReplies: 12Last Post: 9th Jun 2010, 06:16 PM -
Insert Image CODE
By tom247 in forum Web Application/Script SupportReplies: 3Last Post: 9th Jun 2010, 05:04 AM
themaCreator - create posts from...
Version 3.22 released. Open older version (or...