J
|
Jane 10/11/2006 |
Hi, function BeforeAdd(&$values) { global $conn; $str = "select count(*) from TableName where FieldName='".$_SESSION["UserID"]."'"; $rs = db_query($str,$conn); $data = db_fetch_numarray($rs); if ($data[0]>10) { echo "You added 10 records. You can't add more that 10 records."; return false; } else return true; }
|
T
|
tm2000 author 10/18/2006 |
Jane.. |
T
|
tm2000 author 11/3/2006 |
Uh oh <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=12469&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' /> Inner Join `cms_users` ON `cms_details`.`refUsr` = `cms_users`.`username`
function BeforeAdd(&$values) |
J
|
Jane 11/3/2006 |
Hi, |
T
|
tm2000 author 11/3/2006 |
Hey Jane.. Thanks for the quick reply.. Yeah, looks like I did have one.. I since unchecked it.. rebuilt things and still is not limiting things.. |
T
|
tm2000 author 11/4/2006 |
Jane... Can I send you my files for you to review? Don't know what else to do.. I have played with it and no luck.. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=12505&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' /> |
![]() |
Admin 11/6/2006 |
Hi, |
T
|
tm2000 author 11/9/2006 |
... you need to inspect the actual contents of refUsr field in cms_users table. Looks like usernames are not stored there.
$str = "select count(*) from testone where refUsr='".$_SESSION["UserID"]."'";
$str = "select count(*) from cms_users where refUsr='".$_SESSION["UserID"]."'";
|
![]() |
Admin 11/10/2006 |
Hi, |
T
|
tm2000 author 11/10/2006 |
Thanks for getting back to me.. So it has to be someting in my Join MySQL Query? Since it worked before I changed it.. SELECT
// Parameters:
|
D
|
Dale 11/10/2006 |
Just a shot, |
T
|
tm2000 author 11/10/2006 |
Thanks Dale.. I will give that a shot and see what happens.. |
T
|
tm2000 author 11/14/2006 |
DaleM.. Thanks for the note.. Either way, did not work.. |
D
|
Dale 11/14/2006 |
Sorry to waste your time, it was just a thought. |
T
|
tm2000 author 11/14/2006 |
Sorry to waste your time, it was just a thought.... Hey DaleM.. No worries, I appreciate the post and thought... Your idea was better then the one I had - yeah, I did NOT have any <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=12854&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> Thanks.. |
![]() |
Admin 11/14/2006 |
I must be missing something here. |