Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pquery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pquery
Commits
17a0fe1b
Commit
17a0fe1b
authored
Nov 05, 2011
by
Taddes Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added config and test file/
parent
06bcb1db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
+74
-0
config.php
config.php
+48
-0
index.php
index.php
+26
-0
No files found.
config.php
0 → 100644
View file @
17a0fe1b
<?php
/**
* Base and extention config for pQuery utility framework.
*
* @package pQuery
*/
/**
* Indicates whether the framework is in debug mode, which right
* now only means that occuring errors will be displayed or not.
*
* @var bool
*/
define
(
'DEBUG'
,
true
);
/**
* The root location of the pQuery framework folder, used for file inclusions.
*
* @var string
*/
define
(
'PQUERY_ROOT'
,
'D:/xampp/htdocs/pquery/'
);
/**
* Indicates whether errors occuring in the framework will
* terminate the script.
*
* @var bool
*/
define
(
'ERROR_IS_FATAL'
,
true
);
/**
* Abstract class containing extention configs.
*/
abstract
class
Config
{
/**
* Config for MySQL extention.
*
* @var array
*/
static
$sql
=
array
(
'host'
=>
'localhost'
,
'username'
=>
'root'
,
'password'
=>
''
,
'dbname'
=>
'tcms2'
);
}
?>
\ No newline at end of file
index.php
0 → 100644
View file @
17a0fe1b
<?php
include_once
'../debug.php'
;
include_once
'base.php'
;
pQuery
::
require_plugins
(
'array'
,
'sql'
);
// Array test
/*$a = _p(range(0, 10));
while( !$a->is_empty() ) {
debug($a->pop(), $a->reverse()->pop());
}*/
echo
'<br><br>'
;
// SQL test
$sql
=
_sql
(
"select * from posts where slug = '[slug]'"
)
->
set
(
array
(
'slug'
=>
'contact'
));
$results
=
$sql
->
fetch_all
(
'object'
);
$results
=
_arr
(
$results
);
debug
(
$results
);
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment