Why the fuck isn't this working?$query = "SELECT PersonID, LastName FROM Persons";
if($result = $connection->query($query)){
while($row = $result->fetch_assoc()){
printf($row["PersonID"], $row["LastName"]);
}
$result->free();
}
Why is her head so large?
Why are her hands so small?
>>59394678
I would love to ram my dick in her mouth as she's throwing up.
Not sure how you expect the language to recognise that PersonID etc is a variable and not just part of the string
>>59394729
>doesn't even know the language
This is php. PersonID is a row from a database. I'm trying print the result set
>>59394678
Whats the error output ?
>>59394775
There is no error except the nothing is being printed
Is that first if statement useful /necessary?
>>59394678
Your LastName will never print as the second arg to printf, unless PersonID is a format string
>>59394795
Try an "else echo blah blah".
If but no else? I don't know php srry
Also do you have any data in ur db to see if ur query is working ?
Is ur query shit?
>>59394678
Stop watching those fucking ancient mysql tutorials and use pdo
>>59394746
Well theres ur problem, ur using php
Fuck php. I'm done with this shit.
>>59394678
holy fuck do you realize it's 2017? why aren't you using PDO or some other ORM fucknig CHRIST why aren't you using laravel or lumen what is happening here
>>59394678
Get raped and kill yourself, you retarded fucking faggot sack of ugly nigger shit with down syndrome.
>>59394678
unreadable code works faster
>>59394894
He's probably still learning PHP, so telling him to use ORM frameworks isn't going to help him much. He'll still need to know how to query in PHP for those times when the fucking ORM doesn't do everything for you.
That being said, USE THE MODERN FUNCTIONS OP. You can't use shit that nobody else is using and expect us to be able to help you.
Hell, we don't even know what's not working.
>>59394678
Because you're retarded?
>>59394879
Ah and so we've reached the climax of the thread. Can't get no help from g cause some nigga would rather blame the tool then offer help.
This is exactly why g is cancer now.
>>59394678
Because SQL and PHP is retard tier