Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
e5548f75
Commit
e5548f75
authored
May 31, 2010
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Fix: ANSI SQL92
Todo: error in pgsql
parent
ba15e00b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/comm/addpropal.php
+2
-1
2 additions, 1 deletion
htdocs/comm/addpropal.php
htdocs/includes/modules/propale/mod_propale_marbre.php
+2
-1
2 additions, 1 deletion
htdocs/includes/modules/propale/mod_propale_marbre.php
with
4 additions
and
2 deletions
htdocs/comm/addpropal.php
+
2
−
1
View file @
e5548f75
...
@@ -85,8 +85,9 @@ if ($_GET["action"] == 'create')
...
@@ -85,8 +85,9 @@ if ($_GET["action"] == 'create')
// Si numero deja pris (ne devrait pas arriver), on incremente par .num+1
// Si numero deja pris (ne devrait pas arriver), on incremente par .num+1
$sql
=
"SELECT count(*) as nb"
;
$sql
=
"SELECT count(*) as nb"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"propal"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"propal"
;
$sql
.
=
" WHERE ref LIKE '
$numpr
%'"
;
$sql
.
=
" WHERE ref LIKE '
"
.
$numpr
.
"
%'"
;
$sql
.
=
" AND entity = "
.
$conf
->
entity
;
$sql
.
=
" AND entity = "
.
$conf
->
entity
;
$resql
=
$db
->
query
(
$sql
);
$resql
=
$db
->
query
(
$sql
);
if
(
$resql
)
if
(
$resql
)
{
{
...
...
This diff is collapsed.
Click to expand it.
htdocs/includes/modules/propale/mod_propale_marbre.php
+
2
−
1
View file @
e5548f75
...
@@ -100,7 +100,8 @@ class mod_propale_marbre extends ModeleNumRefPropales
...
@@ -100,7 +100,8 @@ class mod_propale_marbre extends ModeleNumRefPropales
// D'abord on recupere la valeur max (reponse immediate car champ indexe)
// D'abord on recupere la valeur max (reponse immediate car champ indexe)
$posindice
=
8
;
$posindice
=
8
;
$sql
=
"SELECT MAX(SUBSTRING(ref,"
.
$posindice
.
")) as max"
;
// TODO le 0+ cree une erreur sous pgsql mais est utile sous mysql si utilisation de différent module dans le passé
$sql
=
"SELECT MAX(0+SUBSTRING(ref FROM "
.
$posindice
.
")) as max"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"propal"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"propal"
;
$sql
.
=
" WHERE ref LIKE '"
.
$this
->
prefix
.
"%'"
;
$sql
.
=
" WHERE ref LIKE '"
.
$this
->
prefix
.
"%'"
;
$sql
.
=
" AND entity = "
.
$conf
->
entity
;
$sql
.
=
" AND entity = "
.
$conf
->
entity
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment