[eluser]developer10[/eluser]
[quote author="Herb" date="1247360498"]I would suggest that you test your sql with something like phpMyadmin in every possible assemblage your code could render, then see if it returns the information you would expect. If it doesn't then you need to rework your sql until it does.
Also based on the variables you set early on, $pDjelatnost and $pGrad are arrays and your if statements forming your query will always evaluate to FALSE as presented. You need to test your if statements by inserting the appropriate values that could occur to ensure they evaluate correctly, then modify as necessary.
Hope this is helpful.[/quote]
look, my sql query works perfectly, i tested it with one, two, etc. parameters, and without any parameters, and it always returns
what it is supposed to.
when i want to apply pagination, i need that variable $config['total_rows'] because my pagination links wont render properly, since
pagination function needs to know how many rows were returned by sql query. sometimes that number is , lets say 1000, and sometimes (when
filters, like city and starting letter are applied, its only 80).
so, that is the parameter i need. otherwise, pagination wont initialize.
i dont know how to put count in my query so i can later retrieve number of rows that were returned by the query.
whats already in the query simply doesn't return anything:
Code:
SELECT *, [b]count(f_id) AS cifra[/b], tbl_djelatnosti.djelatnost FROM
so if you have any suggestions about that, i'd like to hear it. maybe this IS correct way, and i just dont know how to retrieve it and make
it equal to $config['total_rows'] parameter.