17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1271 Views |
-
DataObject::get

19 August 2008 at 12:28pm Last edited: 20 August 2008 11:41am
I really count on U. Is it possible to modify this function and give there some arguments that would be in GET array?.
-
Re: DataObject::get

19 August 2008 at 1:18pm
So what are you trying to pass to DataObject::get()? You can access GET vars the same as normally using $_GET['VariableName'] ?
-
Re: DataObject::get

19 August 2008 at 9:19pm Last edited: 20 August 2008 11:56am
$data = DataObject::get("Article", "ParentID = {$this->ID}) AND (Date>'{$date1}')
AND (Date<'{$date2}'", "Date","","$SQL_start, 2");
return $dataand I know $date from POST but I've got limit and pagination. limit is gived by HTTP::setGetVar in DataObjectSet I can't use more Get Vars ex. $date1...
I want to give more arguments in filter than just ParentID IN .ss file it looks like this:
<% control LatestNews %>
<br>
<table>
<tr>
<td>
<% control Image.SetWidth(75) %>
<img src="$URL" alt="$Nickname's Avatar" />
<% end_control %>
</td>
<td>
$Content.FirstParagraph </td>
</tr>
<a href="$Link" title="Read more">
<tr>
<td>
$Date.Nice
</td>
</tr>
<tr>
<td>read more...
</td>
</tr>
</a>
</table>
<% end_control %>
<% if LatestNews.PrevLink %>
<a href="$LatestNews.PrevLink">Prev</a> |
<% end_if %>
<% control LatestNews.Pages %>
<% if CurrentBool %>
<strong>$PageNum</strong>
<% else %>
<a href="$Link" title="Go to page $PageNum">$PageNum</a>
<% end_if %>
<% end_control %>
<% if LatestNews.NextLink %>
<a href="$LatestNews.NextLink">Next</a>
<% end_if %>When i'm using next link or just any other way of pagination i'm loosing my GET arguments what's normal but i think there are a lot of solutions to do this without database connection...what's not very normal in here
HELP PLEASE?
I can write function setGetVarS, but regular expression is not my best and there would be some more modification that could bring some problems.
When i don't use additional filters pagination's working good. -
Re: DataObject::get

20 August 2008 at 4:52am Last edited: 20 August 2008 11:46am
It's a big problem to me I think that for other people it would be also good advice, or let me know if I can do this any other way.Please.
Edit: I;m saving results in database, everything works good. Leavin' it, but I think DataObjectSet is very intresting and a little to small class ;]
bless
| 1271 Views | ||
|
Page:
1
|
Go to Top |


