Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zdokumentovat Arrays::associate() a Database::fetchAssoc() #582

Open
dg opened this issue Jul 19, 2017 · 6 comments
Open

Zdokumentovat Arrays::associate() a Database::fetchAssoc() #582

dg opened this issue Jul 19, 2017 · 6 comments

Comments

@f3l1x
Copy link
Member

f3l1x commented Jul 22, 2017

Jenom pro poradek, Arrays::associate do Utils a Database::fetch do core?

Tedka tam je kod:

// vrátí asociativní pole id => name
$pairs = $database->fetchAssoc('SELECT id, name FROM users');

// vrátí všechny záznamy jako pole
$rows = $result->fetchAll('SELECT * FROM users');

// vrátí jeden záznam
$row = $result->fetch('SELECT * FROM users WHERE id = ?', $id);

// vrátí přímo hodnotu buňky
$name = $result->fetchField('SELECT name FROM users WHERE id = ?', $id);

Chtel by jsi to s popisem parameteru jo? Kdyz je key i value, jenom key, jenom value, asi vid?

@dg
Copy link
Member Author

dg commented Jul 22, 2017

Tohle issue vyresim sam.

@f3l1x f3l1x assigned dg Jul 22, 2017
@f3l1x
Copy link
Member

f3l1x commented Jul 22, 2017

Super, priradil jsem te. Jestli se muzem domluvit, priste si to klidne prirad sam na sebe a ja budu vedet. Diky.

@dg
Copy link
Member Author

dg commented Jul 22, 2017

Ok, jsem nevěděl, jak to tady funguje ;)

@f3l1x
Copy link
Member

f3l1x commented Jul 22, 2017

Vymluvy? :-D

@f3l1x
Copy link
Member

f3l1x commented Oct 26, 2017

@dg Mohl by jsi na to prosim mrknout? :-) At to mame z krku.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants