[PHP] Validate CSV file With Table in Database!!

2001-09-12 Thread Coenraad Steenkamp

I need to compare a csv file to a table in the database but only one field
in the database with
one field in the CSV file! Comparing only one field will make it much
easier! When there is any change in the Database compared to the CSV file ,
the database must then be updated or if there are no such a field it must be
added to the table!

I am new in php Please help!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Validate CSV file With Table in Database!!

2001-09-13 Thread Coenraad Steenkamp

This is the code i came up with! But it is not 100%
 "") {
 if (!copy($uFile, $move_to_dir."/".$uFile_name)) {
echo "No File Uploaded";
 }
 $curr = fopen($move_to_dir."/".$uFile_name, "r");
 while ($currar = fgetcsv($curr, 1000, ",")) {
$CurrCode = $currar[0];
$Currency = $currar[1];
$From1 = $currar[2];
$To1 = $currar[3];
$ROEX = $currar[4];
$sqlcurr="SELECT * FROM CurrencyNetwork WHERE CNCurr =
'$Currency'";
$result = mysql_query($sqlcurr,$db_con);
if (mysql_fetch_array($result)) {
   //Do Nothing
} else {
$sql="INSERT INTO CurrencyNetwork
(CNCode,CNCurr,CNAdBy,CNDtAd,CNROEX)
  values ('$CurrCode', '$Currency', '$From1', '$To1',
'$ROEX')";
  mysql_query($sql,$db_con);
}

 }
 mysql_close($db_con);
  }
   }
 else
 {
  // No file uploaded, show the form
  echo "";
  echo "Upload this file: ";
  echo "";
  echo "";
 }
?>



"David Robley" <[EMAIL PROTECTED]> wrote in message
01091317241109.14360@www">news:01091317241109.14360@www...
> On Thu, 13 Sep 2001 16:52, you wrote:
> > There is a very good reason !
> > The csv file contains world currency's
> > The system is updated with the changed currency's only !
> > The Master field contains all country currency's , this makes it
> > difficult because if i drop the master table and upload the csv there
> > will only be a few currency's!
> >
> > Thanks
> > Coenraad Steenkamp
> >
> >
> > - Original Message -
> > From: "David Robley" <[EMAIL PROTECTED]>
> > Newsgroups: php.general
> > To: "Coenraad Steenkamp" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Thursday, September 13, 2001 9:18 AM
> > Subject: Re: [PHP] Validate CSV file With Table in Database!!
> >
> > > On Thu, 13 Sep 2001 16:37, Coenraad Steenkamp wrote:
> > > > I need to compare a csv file to a table in the database but only
> > > > one field in the database with
> > > > one field in the CSV file! Comparing only one field will make it
> > > > much easier! When there is any change in the Database compared to
> > > > the CSV file , the database must then be updated or if there are no
> > > > such a field it must be added to the table!
> > > >
> > > > I am new in php Please help!
> > >
> > > That seems an awful lot of work, if you know that the csv is at least
> > > as up to date, if not more so, than the actual table. You might as
> > > well just drop the table and import the contents of the csv.
> > >
> > > Unless there's a good reason not to that you haven't mentioned?
>
> OK. So it sounds like you need to do something like:
>
> for each csv file line
>   select record where table_key = csvfield_key
>   if record found
> if table_other_value != csv_other_value
>   update table with csv_value
> end if
>   else (record not found)
> insert new record
>   end if
> end for
>
> where the key might be perhaps the country name and the other value is
> the current currency.
>
> Am I on the right track? Does that help you any?
>
> --
> David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
> CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
>
>I am functioning within established parameters.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Get Info From Database Without Refreshing the Page! Pretty Neat!

2001-09-13 Thread Coenraad Steenkamp

I used a Microsoft Object Control to get data from the database and display
it on the page
without refreshing the page!This saves alot of browsing time !
Now there is a little bit of a problem ! I dont know if anyone have done
this before exept me and microsoft. I did it in php microsoft did it in asp!
Microsoft can get the data without refreshing the page and use next ,
previous buttons, I can't get the buttons thingy's to work !
If anyone know how to do this please leave some info!
I know how to do it by refreshing the page but if i can do it without
refreshing it would really kick some ass!

Coenraad Steenkamp



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Get Info From Database Without Refreshing the Page! Pretty Neat!

2001-09-13 Thread Coenraad Steenkamp

It is a little something like this


   
   
   
   


With datafields getting the return vallues from EA_Cone010.php3


"Ralph Guzman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What you are trying to do here sounds like it is done on the client end.
I'd
> be willing to bet this requires the use of Javascript/Jscript/VBScript and
> DHTML.
>
> -Original Message-
> From: Coenraad Steenkamp [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 13, 2001 2:29 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Get Info From Database Without Refreshing the Page! Pretty
> Neat!
>
> I used a Microsoft Object Control to get data from the database and
display
> it on the page
> without refreshing the page!This saves alot of browsing time !
> Now there is a little bit of a problem ! I dont know if anyone have done
> this before exept me and microsoft. I did it in php microsoft did it in
asp!
> Microsoft can get the data without refreshing the page and use next ,
> previous buttons, I can't get the buttons thingy's to work !
> If anyone know how to do this please leave some info!
> I know how to do it by refreshing the page but if i can do it without
> refreshing it would really kick some ass!
>
> Coenraad Steenkamp
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Go and look at this shitt! The page does not refresh at all!

2001-09-13 Thread Coenraad Steenkamp

This is what i was talking about in my previous post!
But now i need to get a way of using next and previous with it!
http://www.dev.co.za/devtest/Example/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Anti Leech Script ??????? please

2001-09-14 Thread Coenraad Steenkamp

Does anyone know of a anti leech script and where i could get it!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with dropdownboxes allways ontop of layers!!!!! Please Help!!!!!

2001-09-19 Thread Coenraad Steenkamp




begin 666 BigProb.jpg
M_]C_X `02D9)1@`!`0```0`!``#_VP!#``X*"PP+"0X,"PP0#PX1%2,7%1,3
M%2L?(1HC,RTV-3(M,3 X/U%%.#Q-/3 Q1F!'35166UQ;-T1C:F-8:E%96U?_
MVP!#`0\0$!42%2D7%RE7.C$Z5U=75U=75U=75U=75U=75U=75U=75U=75U=7
M5U=75U=75U=75U=75U=75U=75U=75U?_P `1" $N`JX#`2(``A$!`Q$!_\0`
M'P```04!`0$!`0$```$"`P0%!@<("0H+_\0`M1 ``@$#`P($`P4%
M! 0```%]`0(#``01!1(A,4$&$U%A!R)Q%#*!D:$((T*QP152T? D,V)R@@D*
M%A<8&1HE)B7J#A(6&AXB)BI*3E)66EYB9FJ*CI*6FIZBIJK*SM+6VM[BYNL+#Q,7&
MQ\C)RM+3U-76U]C9VN'BX^3EYN?HZ>KQ\O/T]?;W^/GZ_\0`'P$``P$!`0$!
M`0$!`0$"`P0%!@<("0H+_\0`M1$``@$"! 0#! <%! 0``0)W``$"
M`Q$$!2$Q!A)!40=A<1,B,H$(%$*1H;'!"2,S4O 58G+1"A8D-.$E\1<8&1HF
M)R@I*[EMAIL PROTECTED]$149'2$E*4U155E=865IC9&5F9VAI:G-T=79W>'EZ@H.$
MA8:'B(F*DI.4E9:7F)F:HJ.DI::GJ*FJLK.TM;:WN+FZPL/$Q<;'R,G*TM/4
MU=;7V-G:XN/DY>;GZ.GJ\O/T]?;W^/GZ_]H`# ,!``(1`Q$`/P#J8;A9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