La consulta que me guarda es la siguiente:
    
Código PHP:
Ver original- $url = $newname;  
-     $test=$_POST['test'];  
-     $newLabel=$_POST['newLabel'];  
-     if (($test || $newLabel) && $url){  
-       
-         //Verifico que el archivo que acabo de insertar exista.  
-         {  
-             mysql_query("insert into photos values ('','".$url."','0')");  
-             $result = mysql_query("select id from photos where url='".$url."'");  
-             $photo_id = $row[0]; 
Mi formulario, es el siguiente:    
Código HTML:
Ver original- <form name="newad" method="post" enctype="multipart/form-data"  action="operaciones.php"> 
-  <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
-     
-     
-     
-     
-      <td colspan="2" align="right" ><?php echo imp_menu(); ?></td> 
-  <div id="stylized" class="myform"> 
-   
-  <h1>- Rellena el formulario </h1>
 
- <p>- Debes llenar los campos obligatorios * </p>
 
-     <span class="small">- Nombre de la obra </span>
 
-    <input name="nombre" type="text" size="70" maxlength="70" />  
-     <span class="small">- Numero de contrato </span>
 
-    <input name="ncontrato" type="text" size="20" maxlength="250" />  
-     <span class="small">- Lugar de obra </span>
 
-     <input name="lugar" type="text" size="20" maxlength="70" />  
-     <span class="small">- Fecha de obra </span>
 
- <input name="fecha" value="Dia-Mes-Año" type="text" id="dateArrival" onClick="popUpCalendar(this, form.dateArrival, 'dd-mm-yyyy');" size="10"> 
-   
-   
-   
-   
- <!-- Supervisores --> 
-   
- <? 
-       mysql_connect('127.0.0.1','root','*******')or die ('Ha fallado la conexión: '.mysql_error());  
-                  mysql_select_db('obras')or die ('Error al seleccionar la Base de Datos: '.mysql_error());  
-                   
-         //Me trae los supervisores desde la DB 
- $consulta_sql1=mysql_query("select snombre from supervisor"); 
-   
- while ($registro1 = mysql_fetch_array($consulta_sql1)) 
- { 
- ?> 
-         <option value="<?=$registro1["snombre"];?>- "> 
 
-          <?=$registro1["snombre"];?> 
-         <? 
- } 
- ?> 
-   
-   
-          
-         <? 
-         mysql_connect('127.0.0.1','root','******')or die ('Ha fallado la conexión: '.mysql_error());  
-                  mysql_select_db('obras')or die ('Error al seleccionar la Base de Datos: '.mysql_error()); 
-         //Me trae las categorias desde la DB 
- $consulta_sql2=mysql_query("select cname from category");  
-   
- while ($registro2 = mysql_fetch_array($consulta_sql2)) 
- { 
- ?> 
-         <option value="<?=$registro2["cname"];?>- "> 
 
-          <?=$registro2["cname"];?> 
-         <? 
- } 
- ?>  
-      
-          
-   
-                  
-         <!-- Esta div contendrá todos los campos file que creemos --> 
-         <!-- Hay que prestar atención a esto, el nombre de este campo debe siempre terminar en [] 
-         como un vector, y ademas debe coincidir con el nombre que se da a los campos nuevos  
-         en el script --> 
-          
-          
-    <input type="file" name="image[]" /> 
-    <a href="#" onClick="addCampo()"><label>- Subir otra imagen </a> <span class="small">- Cargar otra imagen </span></label>
 
-    
-    
-   
-  <script type="text/javascript"> 
- var numero = 0;           
- evento = function (evt) {  
-    return (!evt) ? event : evt; 
- } 
- addCampo = function () {  
-    nDiv = document.createElement('div'); 
-    nDiv.className = 'archivo'; 
-    nDiv.id = 'file' + (++numero); 
-    nCampo = document.createElement('input'); 
-    nCampo.name = 'image[]'; 
-    nCampo.type = 'file'; 
-    a = document.createElement('a'); 
-    a.name = nDiv.id; 
-    a.href = '#'; 
-    a.onclick = elimCamp; 
-    a.innerHTML = 'Eliminar'; 
-    nDiv.appendChild(nCampo); 
-    nDiv.appendChild(a); 
-    container = document.getElementById('adjuntos'); 
-    container.appendChild(nDiv); 
- } 
- elimCamp = function (evt){ 
-    evt = evento(evt); 
-    nCampo = rObj(evt); 
-    div = document.getElementById(nCampo.name); 
-    div.parentNode.removeChild(div); 
- } 
- rObj = function (evt) {  
-    return evt.srcElement ?  evt.srcElement : evt.target; 
- } 
-     
-   
- <!--Archivo: <input name="image[]" type="file" size="150" maxlength="150"> --> 
-   
-           
-       <input type="text" name="newLabel" id="newLabel"  /> 
-        
-   
-    
- <select name="test[]" multiple="multiple"> 
- <?php 
-   
-     $result = mysql_query("select label from labels"); 
-         while($row = mysql_fetch_row($result)) echo'<option value="'.$row[0].'">- '.$row[0].' </option>- '; 
 
-          
- ?> 
-      
-     <input class="button" name="Submit" type="submit" value="Guardar" ></td></tr> 
-   
-   
Saludos