C
|
cgphp 7/25/2011 |
To access specific field value use $data: $strSQLExists = "select * from groupmaster where groupname ='" . $data["groupname"] . "'"; |
I
|
imthebest author 7/25/2011 |
To access specific field value use $data: $strSQLExists = "select * from groupmaster where groupname ='" . $data["groupname"] . "'";
|
C
|
cgphp 7/25/2011 |
Nope cgphp. It is not working. I put the above codes. This time getting another issue - Undefined variable data. However, I can following statements on the top of "Before Record Added" event Description Occurs before new record is added Return true if you like to proceed with adding new record, return false otherwise. Parameters $values - array of values to be written to the database. To access specific field value use $values["FieldName"] "dict" is an alternate name for this parameter. $message - place the message to be displayed into this variable. $inline - equals to true when the Inline Add in process, false otherwise That is the reason I used $values instead of $data. Please advice.
|
I
|
imthebest author 7/25/2011 |
Oops! I am Sorry. It is in "Before Record Added" event. |
C
|
cgphp 7/25/2011 |
The sysntax seems right. Check if groupname is the real name of the field. |
I
|
imthebest author 7/25/2011 |
Once again checked. groupname is indeed a real field in mysql database. I am pasting table structure from phpmyadmin below -- |
C
|
cgphp 7/25/2011 |
Is groupname a field of the add page ? |
I
|
imthebest author 7/26/2011 |
Yes, Cgphp. The issue is same as you pointed out. The field name on Add page is mentioned as "Groupname". "G" is capital here. Perhaps it is case sensitive. I made "G" as caps in the sql statement and issue resolved. |