Click here to Skip to main content
15,439,117 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: how to add additional in php query or jquery Pin
Richard Deeming27-Apr-20 0:33
mveRichard Deeming27-Apr-20 0:33 
Questionsocket_send not working without break or exit Pin
Member 147929365-Apr-20 2:04
MemberMember 147929365-Apr-20 2:04 
QuestionHow to share session cookies from a PHP application with my WordPress website, hosted on the same server and the same domain? Pin
mplusplus29-Dec-19 17:50
Membermplusplus29-Dec-19 17:50 
AnswerRe: How to share session cookies from a PHP application with my WordPress website, hosted on the same server and the same domain? Pin
who8mypnuts31-Dec-19 16:28
Memberwho8mypnuts31-Dec-19 16:28 
QuestionSubmit to view hyperlink using PHP? Pin
Member 829590119-Jul-19 10:11
MemberMember 829590119-Jul-19 10:11 
Questionphp + validation ajax + ISSET() Pin
nelsonpaixaopinto16-May-19 12:51
Membernelsonpaixaopinto16-May-19 12:51 
QuestionFailover Architecture (Apache/TOMCAT) Pin
Member 143600218-May-19 3:21
MemberMember 143600218-May-19 3:21 
Questionwhat is the error:mysqli_query() expects parameter 1 to be mysqli, null given in Pin
Amir karim30-Apr-19 7:29
MemberAmir karim30-Apr-19 7:29 
hi guys

PHP
   <?php
$sql="SELECT * FROM users WHERE id=1";
$result=$database->query($sql);
$user_found=mysqli_fetch_array($result);
echo $user_found['user name'];
    ?>


and this is my database class

PHP
public function query($sql){
    $result= mysqli_query($this->connection, $sql);
    return $result;
}


but it isnt execute correctly
this shows me this error
Warning: mysqli_query() expects parameter 1 to be mysqli, null given in \ on line 19
mysqli_fetch_array() expects at least 1 parameter, 0 given in \ on line 12



i dont know why? could you tell me where is the problem please?
AnswerRe: what is the error:mysqli_query() expects parameter 1 to be mysqli, null given in Pin
Richard MacCutchan30-Apr-19 21:39
mveRichard MacCutchan30-Apr-19 21:39 
AnswerRe: what is the error:mysqli_query() expects parameter 1 to be mysqli, null given in Pin
Member 1456979427-Aug-19 7:03
MemberMember 1456979427-Aug-19 7:03 
Questionany latest api for currency converter free Pin
Member 1434851229-Apr-19 21:32
MemberMember 1434851229-Apr-19 21:32 
AnswerRe: any latest api for currency converter free Pin
OriginalGriff29-Apr-19 21:34
mveOriginalGriff29-Apr-19 21:34 
AnswerRe: any latest api for currency converter free Pin
Richard MacCutchan29-Apr-19 21:35
mveRichard MacCutchan29-Apr-19 21:35 
QuestionUtilize webhook using PHP Webhook Listener Pin
Jassim Rahma18-Apr-19 5:04
MemberJassim Rahma18-Apr-19 5:04 
QuestionHaving Trouble moving my Wordpress site offline using MAMP Pin
Davstr15-Apr-19 8:02
MemberDavstr15-Apr-19 8:02 
QuestionConvert the sql query into linq Pin
Member 1246113211-Apr-19 22:52
MemberMember 1246113211-Apr-19 22:52 
AnswerRe: Convert the sql query into linq Pin
Richard MacCutchan11-Apr-19 23:05
mveRichard MacCutchan11-Apr-19 23:05 
Questionwhat is the error : SQL syntax; check the manual that corresponds to your MariaDB server version? Pin
Amir karim3-Apr-19 20:47
MemberAmir karim3-Apr-19 20:47 
AnswerRe: what is the error : SQL syntax; check the manual that corresponds to your MariaDB server version? Pin
Peter_in_27803-Apr-19 21:02
professionalPeter_in_27803-Apr-19 21:02 
GeneralRe: what is the error : SQL syntax; check the manual that corresponds to your MariaDB server version? Pin
Amir karim3-Apr-19 21:24
MemberAmir karim3-Apr-19 21:24 
GeneralRe: what is the error : SQL syntax; check the manual that corresponds to your MariaDB server version? Pin
Richard Deeming3-Apr-19 22:28
mveRichard Deeming3-Apr-19 22:28 
QuestionStored procedure is needed Pin
Member 1246113225-Mar-19 4:02
MemberMember 1246113225-Mar-19 4:02 
AnswerRe: Stored procedure is needed Pin
Richard MacCutchan25-Mar-19 5:40
mveRichard MacCutchan25-Mar-19 5:40 
QuestionHow to call php divisions by a button click Pin
Member 1417791010-Mar-19 22:54
MemberMember 1417791010-Mar-19 22:54 
QuestionDEVELOPING WEB FORM Pin
Member 1402329817-Oct-18 5:40
MemberMember 1402329817-Oct-18 5:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.