Foros del Web » Programando para Internet » PHP »

Recoger datos con select

Estas en el tema de Recoger datos con select en el foro de PHP en Foros del Web. Por favor a ver si me podeis echar una mano con las select, soy nuevo en este lenguaje y me urge tener el codigo acabado, ...
  #1 (permalink)  
Antiguo 18/01/2007, 06:58
Banshi
Invitado
 
Mensajes: n/a
Puntos:
Recoger datos con select

Por favor a ver si me podeis echar una mano con las select, soy nuevo en este lenguaje y me urge tener el codigo acabado, porque no puedo empezar con lo siguiente que si se hacerlo si no termino con esto
Código PHP:
<?php
$c
=mysql_connect("localhost","root",""); 
mysql_select_db("ANDALUCIA",$c);
$fp=fopen("datos3.xml","r"); 
while (
$linea=fgets($fp,1024))
{
if (
substr($linea,0,16)=="<ALUMNOS_CURSOS>"
{
 
$linea=fgets($fp,1024);
if(
substr($linea,1,16)=="<N_SOLICI_EXTER>")
$N_EXT=substr($linea,17,-18);
 
 
$linea=fgets($fp,1024);
 
$linea=fgets($fp,1024);
if (
substr($linea,1,11)=="<N_CUR_AJE>"
$N_CUR=substr($linea,12,strlen($linea)-25);
 
$linea=fgets($fp,1024);
if (
substr($linea,1,9)=="<NIF_NUM>"
$NIF_ALU=substr($linea,10,strlen($linea)-21);
 
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
$linea=fgets($fp,1024);
 
 
$linea=fgets($fp,1024);
if (
substr($linea,1,12)=="<EVALUACION>"
$EVA=substr($linea,13,strlen($linea)-27);
 
$PREV_FECHA=0;
$PREV_HORA=0;
$PREV_SW=0;
$INS_SW=0;
[
COLOR=darkorange]/*Aqui irian dos select con este formato mas o menos[/COLOR]
[COLOR=darkorange]Select N_SOLICI_INTER from ins_subplanes_a where (N_SOLICI_EXTER=$N_EXT)[/COLOR]
 
[COLOR=darkorange]Select N_CUR_PRO from cur where (N_SOLICI_INTER=N_SOLICI_INTER(select anterior)[/COLOR]
[COLOR=darkorange]AND N_CUR_AJE=$N_CUR)*/
[/COLOR]
[
COLOR=darkorange]/*El objetivo es representar la tabla siguiente, pero no se como recoger los datos[/COLOR]
[COLOR=darkorange]de la select, ni de que manera ponerlos para que me lo represente en la tabla.[/COLOR]
[COLOR=darkorange]$N_EXT y $N_CUR son extraidos del fichero xml(codigo de arriba)*/
[/COLOR
print (
"<TABLE BORDER=1>"); 
print 
"<TR>";
print 
"<TD>".$N_SOLICI_INTER."</TD>";
print 
"<TD>".$N_CUR_PRO."</TD>";
print 
"<TD>".$NIF_ALU."</TD>";
print 
"<TD>".$PREV_FECHA."</TD>";
print 
"<TD>".$PREV_HORA."</TD>";
print 
"<TD>".$PREV_SW."</TD>";
print 
"<TD>".$INS_SW."</TD>";
print 
"<TD>".$EVA."</TD>";
print 
"</TR>";
print (
"</TABLE>");
 
}
}
?>

Última edición por Banshi; 18/01/2007 a las 10:21 Razón: He puesto el codigo como si fuera codigo php, antes estaba como texto
  #2 (permalink)  
Antiguo 18/01/2007, 10:19
Banshi
Invitado
 
Mensajes: n/a
Puntos:
Re: Recoger datos con select

Esto es para que no quede en el olvido
  #3 (permalink)  
Antiguo 19/01/2007, 02:18
Banshi
Invitado
 
Mensajes: n/a
Puntos:
Re: Recoger datos con select

Cita:
Iniciado por Banshi Ver Mensaje
Esto es para que no quede en el olvido
Por favor responderme, necesito el codigo terminado
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:26.