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

Linux, Apache, MySQL, PHP

 
QuestionStored procedure is needed Pin
Member 1246113225-Mar-19 4:02
Member 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
Member 1417791010-Mar-19 22:54 
QuestionDEVELOPING WEB FORM Pin
Member 1402329817-Oct-18 5:40
Member 1402329817-Oct-18 5:40 
AnswerRe: DEVELOPING WEB FORM Pin
Mycroft Holmes17-Oct-18 12:43
professionalMycroft Holmes17-Oct-18 12:43 
QuestionWhy my field returns boolean instead of object? Pin
Member 1399562824-Sep-18 3:12
Member 1399562824-Sep-18 3:12 
AnswerRe: Why my field returns boolean instead of object? Pin
Graham Breach24-Sep-18 3:48
Graham Breach24-Sep-18 3:48 
GeneralRe: Why my field returns boolean instead of object? Pin
Member 1399562824-Sep-18 3:50
Member 1399562824-Sep-18 3:50 
Here is my DB methods
PHP
public function action($action, $table, $where = array()) {
		if (count($where) === 3) {
			$operators = array('=', '<', '>', '<=', '>=');

			$field    = $where[0];
			$operator = $where[1];
			$value    = $where[2];

			if (in_array($operator, $operators)) {
				$sql = "{$action} FROM {$table} WHERE {field} {$operator} ?";

				if (!$this->query($sql, array($value))->error()) {
					return $this;
				}
			}
		}

		return false;
	}

	public function get($table, $where) {
		return $this->action('SELECT *', $table, $where);
	}

public function results() {
		return $this->_results;
	}

	public function first() {
		return $this->_results()[0];
	}

	public function error() {
		return $this->_error;
	}

	public function count() {
		return $this->_count;
	}

GeneralRe: Why my field returns boolean instead of object? Pin
Graham Breach24-Sep-18 4:57
Graham Breach24-Sep-18 4:57 
AnswerRe: Why my field returns boolean instead of object? Pin
SiFinances28-Oct-18 0:52
SiFinances28-Oct-18 0:52 
Questionhow to find daily cash book record from two tables with php mysql Pin
Faruk Web10-Aug-18 21:46
Faruk Web10-Aug-18 21:46 
QuestionGet data attribute from an array of select box Pin
Member 85505912-Aug-18 16:23
Member 85505912-Aug-18 16:23 
QuestionHow to allow access to a yii web application for specific users using .htaccess Pin
Member 139352711-Aug-18 23:20
Member 139352711-Aug-18 23:20 
AnswerRe: How to allow access to a yii web application for specific users using .htaccess Pin
Richard MacCutchan2-Aug-18 0:40
mveRichard MacCutchan2-Aug-18 0:40 
AnswerRe: How to allow access to a yii web application for specific users using .htaccess Pin
Richard MacCutchan2-Aug-18 1:31
mveRichard MacCutchan2-Aug-18 1:31 
GeneralRe: How to allow access to a yii web application for specific users using .htaccess Pin
Member 139352712-Aug-18 1:35
Member 139352712-Aug-18 1:35 
GeneralRe: How to allow access to a yii web application for specific users using .htaccess Pin
Richard MacCutchan2-Aug-18 3:49
mveRichard MacCutchan2-Aug-18 3:49 
GeneralRe: How to allow access to a yii web application for specific users using .htaccess Pin
Member 1393527114-Aug-18 1:02
Member 1393527114-Aug-18 1:02 
GeneralRe: How to allow access to a yii web application for specific users using .htaccess Pin
Member 1393527114-Aug-18 1:02
Member 1393527114-Aug-18 1:02 
QuestionHow Can I Start Learning PHP Pin
Andre Hoss3-Jul-18 7:03
Andre Hoss3-Jul-18 7:03 
AnswerRe: How Can I Start Learning PHP Pin
Richard MacCutchan3-Jul-18 8:27
mveRichard MacCutchan3-Jul-18 8:27 
AnswerRe: How Can I Start Learning PHP Pin
Member 1501179923-Dec-20 7:29
Member 1501179923-Dec-20 7:29 
Questionphp-mysql Pin
Raja Jee2-Jul-18 18:38
Raja Jee2-Jul-18 18:38 
AnswerRe: php-mysql Pin
Richard MacCutchan2-Jul-18 21:09
mveRichard MacCutchan2-Jul-18 21:09 
Questiontrying to get ipn simulator to work.... Pin
piano001126-Jun-18 1:35
piano001126-Jun-18 1: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.