Welcome Guest, Not a member yet? Register   Sign In
How do I turn this one line of PHP into CI?
#1

[eluser]Sam Granger[/eluser]
Code:
$match = mysql_fetch_array($result,MYSQL_BOTH);

It's a headscratcher for me, hopefully easy for someone here. Been trying to get this functioning with CI but I don't know what the correct helper would be to achieve this?

Thanks for reading. Smile
#2

[eluser]Thorpe Obazee[/eluser]
Try reading the user_guide: http://ellislab.com/codeigniter/user-guide/database/results.html

It works wonders for me.
#3

[eluser]Sam Granger[/eluser]
so would this be the same code in CI, correct?

Code:
$match = $result->result_array();

And is MYSQL_BOTH default?
#4

[eluser]saidai jagan[/eluser]
yes but it will return only result as arrays.
If u want object use result().




Theme © iAndrew 2016 - Forum software by © MyBB