find date an time of a table update

2006-12-21 Thread Marcelo Fabiani
Hi, I didn't find a way to know the time and date of the last update of  
table, not the data but the table info itself.

Is this possible?

I want to use this info in order to show it in a web page.

Mysql 4.1
Apache
Myisam

Regards

Marcelo Fabiani


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: help with insert +php

2006-09-01 Thread Marcelo Fabiani

Chris W escribió:

Marcelo Fabiani wrote:


Here is the code: . . .
   $result = mysql_query($sq)or die ("problema Leyendo Tabla");;
. . .



Why are there two ; at the end of that line?  I'm really not sure what 
if anything that will do but I would remove it just in case.


Also are there any triggers on this table that could be doing this?


One for the insert comand and the other to browse the data that I have

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: help with insert +php

2006-09-01 Thread Marcelo Fabiani

John Meyer escribió:

Try this

$retval = mysql_query($sql) or die(mysql_error())

To at least get an idea of what MySQL thinks is the error.

The is no error in the insert it adds the row, but in addition add's two 
more rows with no data, only the auto_increment ;

Example:

Adds

1 Marcelo Fabiani   x  
2
3

Marcelo

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: help with insert +php

2006-09-01 Thread Marcelo Fabiani

[EMAIL PROTECTED] escribió:

Marcelo,

The usual advice is to echo out the query string and examine it for syntax.
Assuming it has form data in it for the variables, then try copying/pasting
it into the mysql client and run it from there. Let us know how that goes.


David



  

Already done that and it inserts one row

Marcelo

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: help with insert +php

2006-09-01 Thread Marcelo Fabiani

Jerry Schwartz escribió:

I don't see the form.

Unless one of your included files sets the values of your variables, this
code will insert a row of empty strings every time it executes.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


-Original Message-
From: Marcelo Fabiani [mailto:[EMAIL PROTECTED]
Sent: Friday, September 01, 2006 1:06 PM
To: mysql@lists.mysql.com
Subject: help with insert +php


I'm trying to insert  some data to my our web database, but when Insert
the data, it inserts all the data from my form and ads two rows with no
data.

Can someone tell me what I'm doing wrong?
Here is the code:
  Registro Insertado!!";
$sq = "SELECT * FROM empresas";
$result = mysql_query($sq)or die ("problema Leyendo Tabla");;
echo "";
echo "Nombre
EmpresaNitDireccionTelefono";
while ($row=mysql_fetch_row($result)){
echo
"$row[3]$row[4]$row[5]$row[8]";
}
        echo "";
include 'closedb.php';
 ?>
Regards

Marcelo Fabiani

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





  

Yes here Is the part of the code of the form:



Nombre Empresa: * 
maxlength="100" type="text"> ?



Nombre Contacto: * 
maxlength="100" type="text"> ?


 name="reset" id="reset" value="Limpiar" type="reset">



Marcelo Fabiani



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



help with insert +php

2006-09-01 Thread Marcelo Fabiani
I'm trying to insert  some data to my our web database, but when Insert 
the data, it inserts all the data from my form and ads two rows with no 
data.


Can someone tell me what I'm doing wrong?
Here is the code:
   include 'config.php';

   include 'opendb.php';
   $sql="INSERT INTO empresas (nombreempresa, nomcontacto, nit, 
direccion, ciudad, pais, telefonofijo, fax, email1,   email2, web, 
casilla, observaciones) VALUES 
('$nombreempresa','$nombrecontacto','$nit','$direccion','$ciudad','$pais','$telefono','$fax','$email1','$email2','$web','$casilla','$observaciones')";

   mysql_query($sql) or die ("problema con query");
   echo "  Registro Insertado!!";
   $sq = "SELECT * FROM empresas";
   $result = mysql_query($sq)or die ("problema Leyendo Tabla");;
   echo "";
   echo "Nombre 
EmpresaNitDireccionTelefono";
   while ($row=mysql_fetch_row($result)){   
   echo 
"$row[3]$row[4]$row[5]$row[8]";

   }
   echo "";   
   include 'closedb.php';   
?>

Regards

Marcelo Fabiani

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



using like

2006-08-24 Thread Marcelo Fabiani
Hi to all the group, I have a problem with a query using mysql 
4.01+mysql+php

This is the form i use to get the data for the query:

http://www.ibtec.info/resbu.php";>
Ingrese palabra a buscar

 



and here is the php i use

  \n";
   $row = mysql_fetch_row($result);
   while ($row=mysql_fetch_row($result)){   
 echo "$row[1] \n";

   }
   echo " \n";
   ?>

The problem is that if I use one char like for example "a" I get all 
that match that criteria,that have that char, but if I want to narrow 
the search with more tha one char , for example "aud", and in the table 
there is one math "auditoria".

Hope someone can help me, sorry for my english

Regards
Marcelo

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]