![]() |
Admin 5/18/2020 |
Not sure I understand. Where this code will go? |
K
|
Kervee author 5/18/2020 |
Not sure I understand. Where this code will go?
|
![]() |
Admin 5/18/2020 |
I see what you saying. Take a look at this: |
K
|
Kervee author 5/19/2020 |
I see what you saying. Take a look at this: https://xlinesoft.com/phprunner/docs/db_query.htm You can execute your SQL Query in the beginning, retrieve your data and then use $data["FieldName"] in the code as the manual explains.
|
M
|
MikeT 5/19/2020 |
Something's probably wrong with your query, did you check it by just running the sql agains't the db? And for the thing you're trying to do you'd want to use a query that only returns 1 row, no? |
K
|
Kervee author 5/19/2020 |
Something's probably wrong with your query, did you check it by just running the sql agains't the db? And for the thing you're trying to do you'd want to use a query that only returns 1 row, no? (and some code to decide what to do if no result is returned).
|
M
|
MikeT 5/20/2020 |
I can't say much from here. |
M
|
macalister 5/20/2020 |
When I try to execute the code structure you mentioned, it gives me an error saying Fatal error: Call to a member function fetchAssoc() on boolean in (path of page) on line 150 is this the right way to do it? please see below screenshot, need your help guys
|
K
|
Kervee author 5/21/2020 |
Hi The error "Fatal error: Call to a member function fetchAssoc() on boolean" generally is because you have an error in your query. You can try using db_fetch_array function for testing query to see the sql errors. I use this function to test in MySQL i dont know if in PostgreSQL works
|