Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/02/2005, 20:44
unknown2130
 
Fecha de Ingreso: febrero-2005
Ubicación: México
Mensajes: 5
Antigüedad: 19 años, 3 meses
Puntos: 0
Procedimiento de VFP a PHP y MySQL

Procedure Genera

Hola

Necesito ayuda para convertir este procedimiento de VFP a PHP y MYSQL, por favor si me pueden ayudar se los agradecería mucho, vean que ya tengo tiempo con esto y sigo atorado en lo mismo. Gracias por adelantado a cualquier aportación


Cuenta =1

*Selecciona de base de datos inven los registros según tipo de mantenimiento
*----------------------------------------------------------*
Select Inven
Set filter to inven.mantto_pre = m.mantto_pre and inven.inh_status="A"

*Selecciona Datos

wait window "Actualizando información para generación de calendario" nowait

REPLACE ALL inven.prioridad WITH D0830.prioridad
Set filter to invent.mantto_pre = m.mantto_pre and invent.inh_status ="A" and;
Prioridad # " "

Go top
Cambiokit = invent.kitid
Do while !eof ()
Registro = recno()
Ctr_c = inven.numcc
Kit = inven.kitid
Noseri = inven.inh_noseri
Interno = inven.nointerno
Planta = inven.inh_ubicac

Wait Window "Seleccionando equipo" + interno nowait

Select mantto
Append blank
REPLACE mantto.plantaid WITH planta
REPLACE mantto.kitid WITH kit
REPLACE mantto.numcc WITH ctr_c
REPLACE mantto.nointerno WITH interno
REPLACE mantto.cal_estim1 WITH m.fecha1
REPLACE mantto.cal_estim2 WITH m.fecha2
REPLACE mantto.cal_estim3 WITH m.fecha3
REPLACE mantto.proveedoid WITH m.prove

SELECT invent
Go registro
Skip
diferente
If cambiokit # invent.kitid
Cuenta = cuenta +1

Cambiokit = inven.kitid

Select Folio
If ¡seek (kit)
Append blank
REPLACE folio.kitid WITH kit
EndIf
EndIf



If limite < cuenta

Cuenta =1
If m.fecha1 # { / / }
m.fecha1 = m.fecha1+1
If Dow (m.fecha1)=7
m.fecha1 = m.fecha1+2
EndIf
EndIf

If m.fecha2 # { / / }
m.fecha2 = m.fecha2+1
If Dow (m.fecha2)=7
m.fecha2 = m.fecha2+2
EndIf
EndIf

If m.fecha3 # { / / }
m.fecha3 = m.fecha3+1
If Dow (m.fecha3)=7
m.fecha3 = m.fecha3+2
EndIf
EndIf
EndIf
SELECT inven

EndDo

Wait window "termina Generación de información para Mantenimiento tipo" + m.mantto_pre nowait