Click here to Skip to main content
15,904,287 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: MVC Refresh A Grid Pin
Richard Deeming23-Feb-17 4:04
mveRichard Deeming23-Feb-17 4:04 
QuestionMVCGrid.Net Column Width Pin
Kevin Marois21-Feb-17 13:31
professionalKevin Marois21-Feb-17 13:31 
QuestionRe: MVCGrid.Net Column Width Pin
Richard MacCutchan21-Feb-17 22:10
mveRichard MacCutchan21-Feb-17 22:10 
QuestionWebsite Build Help!! Please Pin
Member 1300832617-Feb-17 15:22
Member 1300832617-Feb-17 15:22 
AnswerRe: Website Build Help!! Please Pin
Afzaal Ahmad Zeeshan17-Feb-17 21:09
professionalAfzaal Ahmad Zeeshan17-Feb-17 21:09 
SuggestionRe: Website Build Help!! Please Pin
Richard Deeming18-Feb-17 1:22
mveRichard Deeming18-Feb-17 1:22 
QuestionAngular JS code Not work Pin
Member 1300557216-Feb-17 4:44
Member 1300557216-Feb-17 4:44 
AnswerRe: Angular JS code Not work Pin
Richard MacCutchan16-Feb-17 5:37
mveRichard MacCutchan16-Feb-17 5:37 
GeneralRe: Angular JS code Not work Pin
Nathan Minier16-Feb-17 6:33
professionalNathan Minier16-Feb-17 6:33 
GeneralRe: Angular JS code Not work Pin
Richard MacCutchan16-Feb-17 7:45
mveRichard MacCutchan16-Feb-17 7:45 
QuestionMvc Discussion forum Pin
pankajkrgupta24-Jan-17 18:51
pankajkrgupta24-Jan-17 18:51 
AnswerRe: Mvc Discussion forum Pin
Richard MacCutchan24-Jan-17 22:35
mveRichard MacCutchan24-Jan-17 22:35 
AnswerRe: Mvc Discussion forum Pin
ZurdoDev25-Jan-17 0:46
professionalZurdoDev25-Jan-17 0:46 
QuestionHow Do I Place Google Translate Correctly Pin
xiecsuk19-Jan-17 6:58
xiecsuk19-Jan-17 6:58 
AnswerRe: How Do I Place Google Translate Correctly Pin
Sushil viper 19-Jan-17 8:38
Sushil viper 19-Jan-17 8:38 
GeneralRe: How Do I Place Google Translate Correctly Pin
xiecsuk19-Jan-17 22:35
xiecsuk19-Jan-17 22:35 
GeneralRe: How Do I Place Google Translate Correctly Pin
Sushil viper 19-Jan-17 22:46
Sushil viper 19-Jan-17 22:46 
GeneralRe: How Do I Place Google Translate Correctly Pin
xiecsuk20-Jan-17 0:01
xiecsuk20-Jan-17 0:01 
QuestionWhy my fetch row method just repeats the first record multiple times (same count as my number of fields in the table) Pin
ELMAGLAYA17-Jan-17 17:07
ELMAGLAYA17-Jan-17 17:07 
I've tried code this below but it gives me one record and it repeats 7 times. Wrong output. Can anyone has a good heart to figure it out please. Please see my complete code below. I'm just a newbie in programming. Sorry. Thank you.
===================================
OUTPUT: 1111111
===================================
_conn=new PDO("mysql:host=$this->_hostdb;dbname=$this->_namedb",$this->_userdb,$this-_passdb);
$this->_conn- >setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
if($this->_conn){
echo "Connected Successfully!
";
}

} catch (Exception $ex) {
echo ("Connection Failed!")."
".$ex->getMessage();
}
}

public static function getInstance(){
if(!isset(self::$_instance))
{
return self::$_instance=new DB();
}
}

public function processQuery($sql){
try{

$q=$this->_conn->prepare($sql);
$q->execute();
$q->setFetchMode(PDO::FETCH_ASSOC);
return $this->rowResult=$q->fetch();

} catch (Exception $ex) {
return ("Failed!")."
".$ex->getMessage();
}
}

public function getResultSet(){
return $this->rowResult;
}

//MAIN PROGRAM
$dbUser=DB::getInstance();
$user=$dbUser->processQuery("SELECT * FROM users");

for($i=0;$i<count($dbuser->rowResult);$i++){
echo $user['id'];
}

?>

modified 17-Jan-17 23:17pm.

AnswerRe: Why my fetch row method just repeats the first record multiple times (same count as my number of fields in the table) Pin
Ashwin. Shetty17-Jan-17 17:39
Ashwin. Shetty17-Jan-17 17:39 
GeneralRe: Why my fetch row method just repeats the first record multiple times (same count as my number of fields in the table) Pin
ELMAGLAYA17-Jan-17 17:41
ELMAGLAYA17-Jan-17 17:41 
GeneralRe: Why my fetch row method just repeats the first record multiple times (same count as my number of fields in the table) Pin
Ashwin. Shetty17-Jan-17 18:32
Ashwin. Shetty17-Jan-17 18:32 
GeneralRe: Why my fetch row method just repeats the first record multiple times (same count as my number of fields in the table) Pin
ELMAGLAYA17-Jan-17 19:33
ELMAGLAYA17-Jan-17 19:33 
AnswerRe: Why my fetch row method just repeats the first record multiple times (same count as my number of fields in the table) Pin
COBOLdinosaur27-Feb-17 8:33
COBOLdinosaur27-Feb-17 8:33 
QuestionI do not know why after entering the second number for the second time, it always gives the same result Pin
Member 1294604611-Jan-17 17:35
Member 1294604611-Jan-17 17:35 

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.