qstore
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
select
|
||||
nombre as "titulo",
|
||||
descripcion as "descripcion",
|
||||
id,
|
||||
objeto as "objeto",
|
||||
nombre as "nombre",
|
||||
precio as "precio",
|
||||
opcion as "opciones",
|
||||
subnombre as "subnombre",
|
||||
promocion as "promocion",
|
||||
imagen as "imagen"
|
||||
|
||||
from tienda where precio >= -1;
|
||||
from tienda where activo =1;
|
||||
|
||||
|
||||
@@ -3,10 +3,12 @@ package Dojo::Model::Users;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Mojo::File 'path';
|
||||
use DBI;
|
||||
use Mojo::Util 'secure_compare';
|
||||
use Dojo::Conf;
|
||||
|
||||
my $data_path = path('lib/Dojo/Model/Data')->make_path;
|
||||
|
||||
sub new { bless {}, shift }
|
||||
sub createu{
|
||||
@@ -56,6 +58,10 @@ sub check {
|
||||
return $r->{pid} // 0;
|
||||
}
|
||||
|
||||
sub store{
|
||||
return _read ($data_path->child("/store/qStore.q")->slurp);
|
||||
}
|
||||
|
||||
sub _read{
|
||||
my ($q,@bind)=@_;
|
||||
my (@empty,$arr);
|
||||
|
||||
@@ -41,9 +41,6 @@ sub event{
|
||||
my ($c,$id)=@_;
|
||||
return shift @{ _read ($data_path->child("event/qEvent.q")->slurp,$id)};
|
||||
}
|
||||
sub store{
|
||||
return _read ($data_path->child("/store/qStore.q")->slurp);
|
||||
}
|
||||
sub tv_videos{
|
||||
return _read ($data_path->child("/tv/qSeries.q")->slurp); #group,name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user