witam
mam takie pola
id
name
surname
email
i chcę dodać tylko do email większą ilość emaili oczywiście jednym poleceniem. wszystko robię przez phpMyAdmin
[email protected],
[email protected],
itd
pzdr.
witam
mam takie pola
id
name
surname
email
i chcę dodać tylko do email większą ilość emaili oczywiście jednym poleceniem. wszystko robię przez phpMyAdmin
[email protected],
[email protected],
itd
pzdr.
UPDATE tabela SET email='root@localhost'
a tak poważnie to przeczytaj jakiś kurs MySQL [cygaro]
czy w ogóle jest możliwośc dodać te adresy przez polecenie insert into ?
albo:
INSERT INTO table (email) VALUES ('[email protected]');
no tak tylko, że ma być dodane np 100 adresów e-mail..
[code]INSERT INTO tabela VALUES
(1, 'Ktos', 'Ktostamzx', '[email protected]'),
(2, 'Ktosq', 'Ktostamzx', '[email protected]'),
(3, 'Ktosw', 'Ktostamcx', '[email protected]'),
(4, 'Ktose', 'Ktostamzx', '[email protected]'),
(5, 'Ktosr', 'Ktostamfd', '[email protected]'),
(6, 'Ktosd', 'Ktostamvc', '[email protected]'),
(7, 'Ktoss', 'Ktostambv', '[email protected]'),
(8, 'Ktosa', 'Ktostamhg', '[email protected]'),
(9, 'Ktosz', 'Ktostammn', '[email protected]'),
(10, 'Ktosx', 'Ktostambnv', '[email protected]'),
(11, 'Ktosxc', 'Ktostambvb', '[email protected]'),
(12, 'Ktosx', 'Ktostamvb', '[email protected]'),
(13, 'Ktosxa', 'Ktostamaaa', '[email protected]');[/code]
Na takie zasadzie dodaj 100 mailów.
$query = 'INSERT INTO tabela VALUES'
for($i=0; $i<100; $i++) {
$query .= '($i, 'Ktos', 'Ktostamzx', '[email protected]'),'
}
$query .= ($i+1, 'Ktosxa', 'Ktostamaaa', '[email protected]');