473,394 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

** ONLINE DATA INSERT --> MYSQL front & PHP script **

Atz
Hi to all !

Im using MySql front and PHP 5 for some web shop.
I didn't try it so far but i guess that the online data insertation ( accept
costs and time ) should be the same process like for local connection.

Problem:
I have to create online ( on remote server ) some 6 tables and some 20
fields with MySql front.
Ok. This shouldn't be great problem ( i hope :-)).
The bigger problem is that i need to insert cca. 450 products ( into
differnt tables (products, pro_groups ... ) ) and i dont know how to make
this online.

For now ( 20 products ) i made all this thru localhost but now i have to
insert much more data and all this online...
The data is sorted thru groups ( 8 major groups ) so every product is part
of some group.

How can i insert data, online and how to pass so much products from
localhost to remote server ( maybe by reading some .txt file ? ).....

Thanx in advance.
Jul 17 '05 #1
2 2825
Atz wrote:
Hi to all !

Im using MySql front and PHP 5 for some web shop.
I didn't try it so far but i guess that the online data insertation ( accept
costs and time ) should be the same process like for local connection.

Problem:
I have to create online ( on remote server ) some 6 tables and some 20
fields with MySql front.
Ok. This shouldn't be great problem ( i hope :-)).
The bigger problem is that i need to insert cca. 450 products ( into
differnt tables (products, pro_groups ... ) ) and i dont know how to make
this online.

For now ( 20 products ) i made all this thru localhost but now i have to
insert much more data and all this online...
The data is sorted thru groups ( 8 major groups ) so every product is part
of some group.

How can i insert data, online and how to pass so much products from
localhost to remote server ( maybe by reading some .txt file ? ).....

Thanx in advance.


create a comma-delimited file with ALL of the information and then use the mysql
LOAD file. This will take just a couple of minutes vs. trying to use a web
page. When dealing with large amounts of data use the appropriate tool...

in your connection simply change the HOST to point to either the IP address or
host name of the remote server:

# -- CONFIGURE THESE VARIABLES --
$USR = 'someuser';
$PWD = 'somepass';
$DB = 'somedb';
# $HOST= 'localhost';
$HOST = '<someipaddress>';
$link=mysql_connect($HOST,$USR,$PWD,$DB);
.........
?>

You may have firewall issues to deal with if it is not on your local LAN and
make sure the user has access from the host you are originating or '%'

update user set host = '%' where user = 'your username';
or
update user set host = '<originating IP address>' where user = 'your username';

--
Michael Austin.
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)
Jul 17 '05 #2
Atz
> create a comma-delimited file with ALL of the information and then use the
mysql
LOAD file. This will take just a couple of minutes vs. trying to use a web page. When dealing with large amounts of data use the appropriate tool...

in your connection simply change the HOST to point to either the IP address or host name of the remote server:

# -- CONFIGURE THESE VARIABLES --
$USR = 'someuser';
$PWD = 'somepass';
$DB = 'somedb';
# $HOST= 'localhost';
$HOST = '<someipaddress>';
$link=mysql_connect($HOST,$USR,$PWD,$DB);
........
?> You may have firewall issues to deal with if it is not on your local LAN and make sure the user has access from the host you are originating or '%'
update user set host = '%' where user = 'your username';
or update user set host = '<originating IP address>' where user = 'your

username';
------------------------------------

Thanx Michael for this answer but i don't get it what do u meen under ALL.

Table Product_Category is related with table Products

E.g. fields for products TABLE:
ID (Auto-Pk), Code, Name, ShortName, Description, LongDescription, Prize,
Date.

***
Product_Groups TABLE
product_id, category_id

-------------------------------------------------------------
So basicly you suggest something like this:

1, 1001, radio, ra, Small radio, Small radio for cars and other places, 100,
12.09.2004 ;
2, 1002, radioo, ra2, Small radio, Small radio for cars and other places,
110, 12.09.2004 ;
3, 1003, cradio, ra3, Small radio, Small radio for cars and other places,
110, 12.09.2004 ;

Products_Groups
1 , 1 ;
2 , 1 ;
3, 1 ;
------------------------------------------------------------
Like i write before, tables products and products_groups are connected

If i enter all the data at once into one table ( products ), can i enter
then all data in the products_groups table ( becuse of relations ) or must i
make insert on the way that
i make insertation of first product ( products table ) and then his categori
and id ( in the products_group table ) and so on....

I ask this becuse of the sorting in the txt file.
Thanx



Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dan | last post by:
I'm trying to connect to a remote database with mysql-front over port forwarded SSH. i have local-host(mycomputer) port 3306 forwarded to local-host(remote) port 3306. I am able to connect but...
0
by: David List | last post by:
I am wondering what I miss to be able to handle binary data from the mysql client. I have ensured that the user has file_priv set to 'Y' and that max_allowed_packet is larger that the binary lumps...
0
by: tamdino | last post by:
Please accept my apologies if I am posting this in the wrong place. I am trying to get started using MySQL-Front and I am totally lost. Does anyone know where there is a tutorial for getting...
6
by: Piotr | last post by:
Hi, I have following problem: I use a form in excel to send data into mysql server, everything is ok unless I have to deal with decimals or data fields, this simple are not recognized. For...
1
by: Brian Bendtsen | last post by:
Hi I have a strange problem with a mysql database and ASP. I try to retrieve a value from a table I have just created with a very simple sql statement. Ex. SELECT myValue FROM myTable WHERE...
2
by: xkp | last post by:
Hi all, i used to use mysql front with my old mysql 3.x version. now i have upgraded to mysql 5.0 and i have just discovered mysql front is not available anymore. I really liked it cause it...
3
by: rollo gerfollo | last post by:
Hi, I have been using MySql-Front Gmbh right up until Monday 7-14-2007, when after downloading a bunch of stuff and keeping dozens of files and windows open for a couple of days, I try to start...
3
by: Waruna | last post by:
Is there a way to block insert into mysql(5.0) using c api of mysql db.. i.e. say there is a table with 2 columns, one contains char other int then i want to insert 500 records at once,, as i...
1
by: polycom | last post by:
Hi, I am coding a mysql health check script. The logic is to execute the commands (only once)show status,show slave status,show variables and fetch the variable name and value in a hash refer or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.