PHP Classes

where Statement

Recommend this page to a friend!

      phpMyDataGrid - AJAX Enabled Datagrid  >  All threads  >  where Statement  >  (Un) Subscribe thread alerts  
Subject:where Statement
Summary:phpMyDataGrid
Messages:2
Author:Rene Beaudry
Date:2006-06-29 18:32:25
Update:2006-06-29 21:42:12
 

  1. where Statement   Reply   Report abuse  
Picture of Rene Beaudry Rene Beaudry - 2006-06-29 18:32:25
I've tried using the where_statement but it does not seem to work.
this is what I'm using

$Browse -> where("Building_Num='0048'");

The class acts like its not there at all and gives me a list of all my records in my database.
If I place the where in the sql query it works

$Browse -> sqlstatement(" select * from building where strict_Num=$District_Num");

but I'm not able to edit the record as it gives me an error.
Fatal error: Call to undefined function errorSQL() in C:\xampp\htdocs\tech\datagrid\examples\phpMyDataGrid.inc.php on line 719

I would like to use your class to bring up one record that is editable. Is this possible?

  2. Re: where Statement   Reply   Report abuse  
Picture of Gustavo Arcila Gustavo Arcila - 2006-06-29 21:42:12 - In reply to message 1 from Rene Beaudry
Hi,

I'll check for the Where issue and post any solution but maybe in 15 days or more because I'm a little bit busy by this days, sorry :-$

in
$Browse -> sqlstatement(" select * from building where strict_Num=$District_Num");

try to use
$Browse -> sqlstatement(" select * from building where strict_Num='$District_Num'");

Fatal error: Call to undefined function errorSQL() in C:\xampp\htdocs\tech\datagrid\examples\phpMyDataGrid.inc.php on line 719

is generated because class can't find errorSQL function, this function is located in mylibrary.php or you can build your own.

as I understand, in the little english i know, you ask if you can edit only one record at time... Yes you can with the upper SQL instruction, I think your mistake was the '

Regards,

Gustavo