pixeltrace
Members-
Posts
577 -
Joined
-
Last visited
Never
Everything posted by pixeltrace
-
[SOLVED] how to check duplicate entries in mysql
pixeltrace replied to pixeltrace's topic in PHP Coding Help
thanks! because i need to check if there are any username and email duplicates in my table. hope you could help me what php script or sql query to use to check this. thanks again! -
help on enabling mod_rewrite in apache
pixeltrace replied to pixeltrace's topic in Apache HTTP Server
Hi i am using linux. also i went to my httpd.conf file the configuration says that its something like vhost. also i cannot find this line #LoadModule rewrite_module modules/mod_rewrite.so and this line also AllowOverride if thats the case should i just add this LoadModule rewrite_module modules/mod_rewrite.so and this AllowOverride help on this please. thanks! -
help on enabling mod_rewrite in apache
pixeltrace replied to pixeltrace's topic in Apache HTTP Server
thanks! how will i restart the apache? what is the command? thanks! -
Hi, Apache user newbie here. I need help, how do i enable mod_rewrite in my apache? what are the codes or lines that i should have in my httpd.conf file? also, what are the other files that i need to modify and things, testing to do to make it and know that its already working? hope you could help me with this. thanks so much!!!!
-
Hi, I imported a csv file in mysql. i am using phpmyadmin to import csv files in mysql database. how do can i check or what query will i use to check if there are any duplicate items in the table? hope you could help me with this. thanks!
-
Hi Madtechie, sorry for the late update, this is the error that i am getting Parse error: parse error, unexpected $ in /var/www/html/memoryworld/csv/test1.php on line 33 and this is the current code that i have <?php $row = 1; $handle = fopen("jos_muse_users1.csv", "are"); while (($data = fgetcsv($handle, 5774, ",")) !== FALSE) { $num = count($data); echo "<p> $num fields in line $row: <br /></p>\n"; $row++; $SQLq =""; for ($c=0; $c < $num; $c++) { echo $data[$c] . "<br />\n"; $SQLq .= "$data[$c],"; } $SQLq = trim($SQLq, ","); //---- database $dbhost = 'localhost'; $dbusername = 'username'; $dbpasswd = 'password'; $database_name = 'MCJoomla'; $connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") or die ("Couldn't connect to server."); $db = mysql_select_db("$database_name", $connection) or die("Couldn't select database."); $query = "INSERT INTO jos_muse_users (MemberID, ContactID, GivenName, FamilyName, Email, AddressAsEmail, HomePhone, BusinessPhone, Mobile, Gender, DateofBirth ,Address1, Address2, PostalCode, SourceForm, NRIC, Race, Nationality, ChildName, ChildDOB, ChildGender, City, State, Country, SourcePortal) VALUES ($SQLq)"; echo $query; $sql = mysql_query($query) or die (mysql_error()); //--- database fclose($handle); ?> hope you could still help me on this. thanks!
-
any help on this please. thanks!
-
Hi Barand, I already download and installed MySQL Query Browser. i tried to execute this LOAD DATA LOCAL INFILE 'C:\Documents and Settings\pixeltrace\My Documents\jos_muse_users1.csv' INTO TABLE jos_muse_users FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' (MemberID, ContactID, GivenName, FamilyName, Email, AddressedAsEmail, HomePhone, BusinessPhone, Mobile, Gender, DateofBirth, Address1, Address2, Post its tells me that "No database is selected" in the right panel, i already click the table where i want to load the csv. how do i solve this? need help. thanks!
-
i see, yeh, that is one solution. thanks!
-
guys, i need help, one of my sites that i maintain has an edit profile and on that page, there is a field for the password password textfield verifypass textfield currently the password is in md5 how do i set this up in such a way that if the user edits his profile the current password is already there. need help on this please. thanks!
-
by the way, with regards to internet connection i still cannot connect to the internet when i ping the gw, still no response ifconfig is ok route list gateway is there but i cant ping the gateway. o response but the led in our hub and eth of the server is blinking. i type route add default gw 192.168.0.201 eth0 for the gateway help on this please. thanks!
-
i agree with you. my boss is a moron. maybe he doesnt know how to do this also that's why he puts all these to me. yes it is a webserver. i was able to install linux already set the ethernet my problem now how do i install the 3 items that he wants me to install? thanks!
-
hi, linux newbie here, is there any ebook or document on how to install redhat 9 as a linux server? i dont know if i am doing it the right way that's why i may need a documentation for this. also what is tomcat? because when i was installing redhat9 there is a part there where you need to select the partition. when i ask my boss he just gave me this text as the requirement for the server: B. Directory information: 1. Tomcat installation: /etc/init.d/tomcat /usr/jakarta-tomcat-4.1.30 2. Opencms installation: /usr/jakarta-tomcat-4.1.30/webapps/ROOT 3. MySQL installation: /etc/init.d/mysql /var/lib/mysql 4. Backup MySQL: mysqldump --opt --user=root opencms | gzip -9 > opencms-db.sql.gz what does he mean about this? and is tomcat also linux? sorry i still havent tried using linux eversince, and this is going to be the first time. hope you could help me with this. thanks!
-
Hi, How can i get the one from paypal? is it free? if not, what are the requirements and do they have a demo? thanks again!
-
Guys, i have a project which needs a shopping cart. i haven't done any sites with shopping carts yet any suggestions as to what shopping cart i can use that is free and easy to setup on php websites? thanks!
-
Hi Barrand, how do i use this? normally, when i import csv, i just go to the import section, select the csv file in my local pc. next field, i just left it there, normally by default its utf8 next portion, i skip. next part is on the bottom, select csv, check "replace table data with file", check ignore duplicate rows then i click "go". what is wrong on my procedure? because using this procedure i am getting and error like Invalid field count in CSV input on line 1. also how do i use the code you gave me? and where to run it? i tried attaching my csv file but its kinda big. you can just check the csv file here http://mango.resonance.com.sg/memoryworld/csv/users.csv hope you could help me with this. thanks so much!
-
Hi, Thanks again! i tried using the codes you gave me <?php $row = 1; $handle = fopen("test.csv", "r"); while (($data = fgetcsv($handle, 5774, ",")) !== FALSE) { $num = count($data); echo "<p> $num fields in line $row: <br /></p>\n"; $row++; $SQLq =""; for ($c=0; $c < $num; $c++) { echo $data[$c] . "<br />\n"; $SQLq .= "$data[$c],"; } $SQLq = trim($SQLq, ","); //---- database $dbhost = 'localhost'; $dbusername = 'username'; $dbpasswd = 'password'; $database_name = 'MCJoomla'; $connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") or die ("Couldn't connect to server."); $db = mysql_select_db("$database_name", $connection) or die("Couldn't select database."); $sql = mysql_query("INSERT INTO jos_muse_users (MemberID, ContactID, GivenName, FamilyName, Email, AddressAsEmail, HomePhone, BusinessPhone, Mobile, Gender, DateofBirth ,Address1, Address2, PostalCode, SourceForm, NRIC, Race, Nationality, ChildName, ChildDOB, ChildGender, City, State, Country, SourcePortal) VALUES ($SQLq)") or die (mysql_error()); //--- database fclose($handle); ?> but i am getting this error Parse error: parse error, unexpected $ in /var/www/html/memoryworld/csv/test.php on line 33 what does this mean? hope you could help me on this. thanks!
-
how to insert multiple items to the database
pixeltrace replied to pixeltrace's topic in PHP Coding Help
any help for this? thanks so much! -
ey, my apologies on this matter. honestly, the reason why i posted twice because my current connection is slow im just sniffing currently using my blueberry and during my first post while submitting, i lost my internet connection and it took some time because i got back again, i posted back because when i went back i didnt saw my first post. i've been posting here eversince and this is the first time that it happened to me. my apologies again thanks!
-
hi, i used this script you shared me and this is what it displays http://www.jobhirings.com/csv/test.php also, i changed the value "1000" to 5774 since this is the total row in mg csv my prob now is, how can i insert this into my database? need help on this please. thanks so much!
-
Hi, Thanks for all the help! using this code? how can i insert the items into my database?
-
how to insert multiple items to the database
pixeltrace replied to pixeltrace's topic in PHP Coding Help
hi, thanks! i am aware about the insert query but my problem now is i have to inpuut 5000 items to the database and the items are inside a csv file. are there any better solutions for this? aside from creating 1 query for each? thanks! -
how to insert multiple items to the database
pixeltrace replied to pixeltrace's topic in PHP Coding Help
hi, yes. 7 of 25 rows. sorry. hope you could help me with this. what is the php script to run this? i tried importing using csv file but i am getting some problems. all of the items are being inserted to just 1 row instead of going to its respective rows. attached is a copy of my csv file. hope you could help me with this. thanks! -
guys, i need help. i am getting some errors importing csv file into my database. what happens is, all the data from my csv file is just being inserted into 1 row instead of going to its respective rows attached is a copy of my csv file. hope you could help me with this i am using mysql 4.1.12 thanks!
-
guys, is there a way to load CSV file into a PHP page? if ever, how and what is the code? thanks!