Page 1 of 1

how 2 maintain database 4 php & how 2 connect database inphp

Posted: Fri Sep 25, 2009 8:15 am
by nehrav
Please guys,

tell me how can I maintain database for php...
I want to import the data/records from excel sheet in my database....
I am using phpMyadmin with WAMP.

Secondly, how to connect with my database...
On searching in google, I find this code suggested by developers...
I jst want to know where to add this...

<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

// some code
?>

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Fri Sep 25, 2009 8:18 am
by Mike2009
Have you read this already: viewtopic.php?f=1&t=106696

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Sat Sep 26, 2009 5:18 am
by nehrav
Mike2009 wrote:Have you read this already: viewtopic.php?f=1&t=106696
Mike, I appreciate your reply but I don't want particular cell range and I don't want the value
to be get stored in any array :( .

I just want my data to be transferred from excel file to my database...
I want it to be work as tool........ :dubious:

1000 records in one shot...... :crazy:

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Mon Sep 28, 2009 2:24 pm
by josh
phpmyadmin has import functions.

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Thu Oct 01, 2009 2:52 pm
by satishbhawra42
On searching in google, I find this code suggested by developers...
I jst want to know where to add this...

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Fri Oct 02, 2009 5:34 am
by josh
Click on databases, click your database.... click the import tab, once youre on this screen the next steps are pretty self evident.

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Thu Oct 08, 2009 7:19 am
by nehrav
josh wrote:Click on databases, click your database.... click the import tab, once youre on this screen the next steps are pretty self evident.
JOSH, I try uploading excel file using import function, but its giving me

invalid field count on file ....... on line 1................ 8O 8O 8O

I stuck at every step........ :cry:

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Thu Oct 08, 2009 11:21 am
by josh
use csv

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Fri Oct 09, 2009 6:09 am
by nehrav
josh wrote:use csv
I am using csv file only but..... :banghead:

Invalid field count in CSV input on line 1

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Fri Oct 09, 2009 1:40 pm
by josh
your field count must be invalid then

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Mon Oct 12, 2009 8:30 am
by nehrav
josh wrote:your field count must be invalid then
can you send me a sample file, I will make amendments in that.. :drunk:

Re: how 2 maintain database 4 php & how 2 connect database inphp

Posted: Tue Oct 13, 2009 1:20 am
by josh
Meaning it differs from the field count of your table.