[symfony-users] RESTFul etag

2010-11-05 Thread Shihab KB
Dear friends,

Can you explain me the significance and benefits of enabling the ETag
feature ?

regards
Shihab

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Trying to build and load

2010-11-05 Thread Gareth McCumskey
Try doing a truncate on your tables (not delete) to reset the primary key
values of all the tables. WHat looks like is happening is that your fixtures
are being inserted with the auto-incrementing ID and if you have had data in
that table before it continues auto-incrementing from what the previous data
ended at.

On Thu, Nov 4, 2010 at 11:03 PM, Javier Garcia tirengar...@gmail.comwrote:

  Hi,

 i have just created a new project and this models and the fixtures below:


  culture:
id: ~
code:   { type: CHAR, size: 6, default: 'it', required: true }
text:   { type: VARCHAR, size: 50, default: 'italiano',
 required: true }
folder_prod:{ type: VARCHAR, size: 50, default: 'italian', required:
 true }


  sediOK:
id:  ~
culture_id:  { type: integer, required: true, foreignTable:
 culture, foreignReference: id }
nations_id:  { type: integer, required: true, foreignTable:
 nations, foreignReference: id }
paese_indirizzo: { type: varchar(32), required: true }
ufficio: { type: varchar(64), required: true}
indirizzo:   { type: longvarchar, required: true }


 culture:
  italiano:{code: it, text: italiano, folder_prod: italian }
  frencese:{code: fr, text: francese, folder_prod: francoise }
  inglese: {code: en, text: inglese, folder_prod: english }


 sediOK:
  sede_roma_1_italiano:  { culture_id: 1, nations_id: 105,
 paese_indirizzo: Italia, ufficio: Ufficio di Roma 1:, indirizzo:
 Testaccio Via Galvani, 17 Roma - 00153 Italia }
  sede_roma_1_francese:  { culture_id: 2, nations_id: 105,
 paese_indirizzo: Italia, ufficio: Rome Office 1:, indirizzo: Testaccio
 Via Galvani, 17 Roma - 00153 Italia }
  sede_roma_1_spagnolo:  { culture_id: 4, nations_id: 105,
 paese_indirizzo: Italia, ufficio: Oficina de Roma 1:, indirizzo:
 Testaccio Via Galvani, 17 Roma - 00153 Italia }


 When i do propel:build-all-load it says:

 The object 1 from class Culture is not defined in your data file.

 So it's not inserting the culture fixtures but i dont know why...If I
 remove the sediOK model and fixtures, and then do build-all-load the
 culture fixtures are inserted ok.

 Any idea?

 --

 Javi

 Ubuntu 10.04, sf 1.4

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] RESTFul etag

2010-11-05 Thread Gareth McCumskey
ETag is just a way to have finer grained control over caching and to manage
when to reprocess a request or just send back a cached response. So for
example, if you send a GET request for a resource with id 10 and get a
result, sending a request later for id 10 should respond back with the
cached version if the resource of id 10 has not changed but reprocess the
request if it has changed.

On Fri, Nov 5, 2010 at 8:29 AM, Shihab KB shiha...@gmail.com wrote:

 Dear friends,

 Can you explain me the significance and benefits of enabling the ETag
 feature ?

 regards
 Shihab

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Question: The best way to embed javascript : in parial or in js files

2010-11-05 Thread oscar balladares
A partial is what it is, just a piece of code that appears where you called
it; you should have 1 .js file per action. Think about 4 partials for 1
action, it is better to have 1 js file to refer that action instead 4 js
pieces of code.

This is for sure an advice only ;)

2010/11/3 JoJo jojoyangd...@gmail.com

 Hello everyone,

 I have a question not very technical but quite structural.

 In my modules, I use some partials to complete the layout. And in these
 partials, I use some javascript functions. So when page loaded, these
 javascript functions are added in the middle of template.

 I think that it is not very clean do display js in that way, because
 normally they should be added between head/head, but these js functions
 are spécificaly for its partials and in several js functions, i need the
 objects passed from action or component.

 So can anyone suggest what is the best way to implement these javascript
 functions please.

 Thanks in advance.

 Best Regards,

 JoJo

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Unable to insert fixtures : Unknown record property / related component lucene_index on JobeetJob

2010-11-05 Thread SCO
Bonsoir,

J'ai dérivé de l'exemple Jobeet et avais mis en place la
fonctionnalité de Search (sans l'Ajax) avec succès. Mais après
l'intégration de sfGuard et sfApply, je n'arrive plus à inserer mes
fixtures (ceci étant, je doute que ces deux plugons soit a l'origine
du probleme) :

t...@ubuntu:~/trunk/sf_sandbox$ php symfony doctrine:data-load
 doctrine  Loading data fixtures from 
 /home/toto/trunk/sf_sandbox/data/fixtures
 doctrine  Loading data fixtures from 
 /home/toto/trunk/sf_sandbox/plugins/sfDoctrineGuardPlugin/data/fixtures

  Unknown record property / related component lucene_index on
JobeetJob

J'ai l'impression que lors de l'insertion des fixtures, il y a une
méprise par le framework entre la méthode GetLuceneIndex() définie
dans BetaProposalTable.class.php et cette propriété lucene_index qui
n'existe absolument pas (un grep -ar lucene_index partout n'a rien
donné d'ailleurs, ce a quoi je m'attendais).
Dois-je renommer GetLuceneIndex() en myGetLuceneIndex() pour éviter ce
conflit, ou bien ai-je raté qq chose ?

Merci pour votre aide !

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Is this a normal behavior ? 45.54% doing gettimeofday

2010-11-05 Thread Elvis
xdebug was not enabled, and no other debug modules loaded.
The first test was using a production server with nginx with phpfast-
cgi, and the percent of the gettimeofday call was similar. The one
below was on a server with apache.

On Nov 3, 12:47 am, Alexandre Salomé alexandre.sal...@gmail.com
wrote:
 Isn't it because of debug modules (XDebug, ...) ?
 Try optimisation of benchmark environment, to look like production server.

 Le 2 nov. 2010 22:50, Elvis apostolel...@gmail.com a écrit :

 After doing some concurrency tests on a project, I've checked what
 does the php calls with strace -c -p apache PID. I've used the latest
 symfony sandbox and made this call ab -n 100 -c 1http://test1.domain.ltd/
 ( 100 requests with 1 concurrent request, so nothing fancy)

 and got these results :

 % time     seconds  usecs/call     calls    errors syscall
 -- --- --- - - 
  45.54    0.039688           0    281500           gettimeofday
  23.68    0.020641           8      2500           brk
  7.44    0.006484           0     32600       100 read
  5.71    0.004974           1      9500       300 open
  4.59    0.004001          40       100           accept
  4.27    0.003722           0      9300      4200 access
  2.57    0.002239           0     11900           time
  1.99    0.001731           0      9600           lstat64
  1.38    0.001202           0      9300           close
  0.89    0.000772           0      8900           fstat64
  0.64    0.000560           3       200           write
  0.30    0.000264           0      1900      1000 stat64
  0.21    0.000180           0       900           fcntl64
  0.18    0.000160           2       100           flock
  0.17    0.000146           1       100           munmap
  0.15    0.000132           1       100           writev
  0.13    0.000113           1       200           chdir
  0.10    0.86           0       200           getcwd
  0.07    0.63           0       400           getdents64
  0.00    0.00           0       400           umask
  0.00    0.00           0       300           setitimer
  0.00    0.00           0       100           _llseek
  0.00    0.00           0       100           poll
  0.00    0.00           0       200           rt_sigaction
  0.00    0.00           0       200           rt_sigprocmask
  0.00    0.00           0       100           mmap2
  0.00    0.00           0       100           getsockname
  0.00    0.00           0       100           shutdown
 -- --- --- - - 
 100.00    0.087158                380900      5600 total

 Is it normal to have 281500 calls (2815 calls / request -  45.54%) to
 gettimeofday in an empty symfony project ?

 I'm trying the investigate potentially bottlenecks in my app on high
 concurrency.

 Best regards,
 Elvis

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@goog 
 legroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] constraint violation: 1048 Column 'id' cannot be null

2010-11-05 Thread Jaime Merino Mora
I found it...

http://trac.symfony-project.org/attachment/ticket/8650/i18n-1.4.patch


El jue, 04-11-2010 a las 06:44 -0700, Jaime escribió:
 Hi,
 
 i'm in trouble with the inserts on the generate-admin i18n forms.
 Alway have the same error,
 
 SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'id'
 cannot be null
 
 I tried to patch de bug #7626 http://trac.symfony-project.org/ticket/7626
 without luck.
 
 this is the schema.yml
 
 dolPai:
   tableName: dol_pais
   actAs:
 I18n:
   fields: [Nombre]
   columns:
 Id:
   type: integer(4)
   primary: true
   notnull: true
   autoincrement: true
 Iso2:
   type: string(2)
   notnull: true
   fixed: true
 Nombre:
   type: string(150)
   notnull: true
 
 I don't know what i'm doing wrong
 Thanks
 

Jaime Merino
ja...@invasionweb.com
www.invasionweb.com
902 00 16 16

--

Antes de imprimir este e-mail piense bien si es realmente necesario.
Before printing this e-mail, assess if it is really needed.



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] clean-model-files for Propel?

2010-11-05 Thread Javier Garcia
Hi,

when i try build-all-load i'm getting errors about models that
doesn't exist any more in my schema. I know in doctrine i can use
clean-model-files but in propel?

Javier

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] sending email from task through CLI

2010-11-05 Thread hribo
i would like to ask you for the way to send email from the task. i
know there are plenty of discussions showing how to do it.
but i have actually problem when i am sending my emails, and this
error shows up:

Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465
(Unable to find the socket transport ssl - did you forget to enable
it when you configured PHP?) in C:\wamp\www\my_sites\_SYMFONY
\symfony-1.4.3\lib\vendor\swiftmailer\classes\Swift\Transport
\StreamBuffer.php on line 233


  Connection could not be established with host smtp.gmail.com [Unable
to find the socket transport ssl - did you forget to enable it when
you configured PHP? #274232]


my factories.yml is set correctly for sure, because when i am sending
emails not from tasks, IT WORKS. just not through task.
  transport:
class: Swift_SmtpTransport
param:
  host: smtp.gmail.com
  port: 465
  encryption: ssl
  username: x...@gmail.com
  password: 

i have also looked on my phpinfo() function and there i have already
allowed SSL:
Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls

do you know where is the problem?
thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] sending email from task through CLI

2010-11-05 Thread Alex Pilon
What's your task code look like?

On Nov 5, 2010 8:24 AM, hribo hribo...@gmail.com wrote:

i would like to ask you for the way to send email from the task. i
know there are plenty of discussions showing how to do it.
but i have actually problem when i am sending my emails, and this
error shows up:

Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465
(Unable to find the socket transport ssl - did you forget to enable
it when you configured PHP?) in C:\wamp\www\my_sites\_SYMFONY
\symfony-1.4.3\lib\vendor\swiftmailer\classes\Swift\Transport
\StreamBuffer.php on line 233


 Connection could not be established with host smtp.gmail.com [Unable
to find the socket transport ssl - did you forget to enable it when
you configured PHP? #274232]


my factories.yml is set correctly for sure, because when i am sending
emails not from tasks, IT WORKS. just not through task.
 transport:
   class: Swift_SmtpTransport
   param:
 host: smtp.gmail.com
 port: 465
 encryption: ssl
 username: x...@gmail.com
 password: 

i have also looked on my phpinfo() function and there i have already
allowed SSL:
Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls

do you know where is the problem?
thank you

--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDoctrineGuard Logged User Time

2010-11-05 Thread Marcelo
Thanks for your help

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sending email from task through CLI

2010-11-05 Thread Florian
It looks like the stream socket transport you're using doesn't exist.

try with sslv3 or sslv2 encryption method:

 transport:
class: Swift_SmtpTransport
param:
  host: smtp.gmail.com
  port: 465
  encryption: sslv3
  username: x...@gmail.com
  password: 


On 5 nov, 13:24, hribo hribo...@gmail.com wrote:
 i would like to ask you for the way to send email from the task. i
 know there are plenty of discussions showing how to do it.
 but i have actually problem when i am sending my emails, and this
 error shows up:

 Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465
 (Unable to find the socket transport ssl - did you forget to enable
 it when you configured PHP?) in C:\wamp\www\my_sites\_SYMFONY
 \symfony-1.4.3\lib\vendor\swiftmailer\classes\Swift\Transport
 \StreamBuffer.php on line 233

   Connection could not be established with host smtp.gmail.com [Unable
 to find the socket transport ssl - did you forget to enable it when
 you configured PHP? #274232]

 my factories.yml is set correctly for sure, because when i am sending
 emails not from tasks, IT WORKS. just not through task.
       transport:
         class: Swift_SmtpTransport
         param:
           host: smtp.gmail.com
           port: 465
           encryption: ssl
           username: x...@gmail.com
           password: 

 i have also looked on my phpinfo() function and there i have already
 allowed SSL:
 Registered Stream Socket Transports     tcp, udp, ssl, sslv3, sslv2, tls

 do you know where is the problem?
 thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sending email from task through CLI

2010-11-05 Thread Florian
Another question: did you run phpinfo() function from the cli ?

php -a
 phphinfo();

or php -r phpinfo();



On 5 nov, 14:09, Florian sideral.undergro...@gmail.com wrote:
 It looks like the stream socket transport you're using doesn't exist.

 try with sslv3 or sslv2 encryption method:

      transport:
         class: Swift_SmtpTransport
         param:
           host: smtp.gmail.com
           port: 465
           encryption: sslv3
           username: x...@gmail.com
           password: 

 On 5 nov, 13:24, hribo hribo...@gmail.com wrote:







  i would like to ask you for the way to send email from the task. i
  know there are plenty of discussions showing how to do it.
  but i have actually problem when i am sending my emails, and this
  error shows up:

  Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465
  (Unable to find the socket transport ssl - did you forget to enable
  it when you configured PHP?) in C:\wamp\www\my_sites\_SYMFONY
  \symfony-1.4.3\lib\vendor\swiftmailer\classes\Swift\Transport
  \StreamBuffer.php on line 233

    Connection could not be established with host smtp.gmail.com [Unable
  to find the socket transport ssl - did you forget to enable it when
  you configured PHP? #274232]

  my factories.yml is set correctly for sure, because when i am sending
  emails not from tasks, IT WORKS. just not through task.
        transport:
          class: Swift_SmtpTransport
          param:
            host: smtp.gmail.com
            port: 465
            encryption: ssl
            username: x...@gmail.com
            password: 

  i have also looked on my phpinfo() function and there i have already
  allowed SSL:
  Registered Stream Socket Transports     tcp, udp, ssl, sslv3, sslv2, tls

  do you know where is the problem?
  thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sending email from task through CLI

2010-11-05 Thread guiguiboy
Have you looked at the php.ini of your CLI ? Is the lib enabled (as in
your php.ini in apache dir) ?


On 5 nov, 14:15, Florian sideral.undergro...@gmail.com wrote:
 If you're on windows, read this:

 http://vittoriop77.blogspot.com/2007/10/php-registered-stream-socket-...

 On 5 nov, 14:11, Florian sideral.undergro...@gmail.com wrote:

  Another question: did you run phpinfo() function from the cli ?

  php -a

   phphinfo();

  or php -r phpinfo();

  On 5 nov, 14:09, Florian sideral.undergro...@gmail.com wrote:

   It looks like the stream socket transport you're using doesn't exist.

   try with sslv3 or sslv2 encryption method:

        transport:
           class: Swift_SmtpTransport
           param:
             host: smtp.gmail.com
             port: 465
             encryption: sslv3
             username: x...@gmail.com
             password: 

   On 5 nov, 13:24, hribo hribo...@gmail.com wrote:

i would like to ask you for the way to send email from the task. i
know there are plenty of discussions showing how to do it.
but i have actually problem when i am sending my emails, and this
error shows up:

Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465
(Unable to find the socket transport ssl - did you forget to enable
it when you configured PHP?) in C:\wamp\www\my_sites\_SYMFONY
\symfony-1.4.3\lib\vendor\swiftmailer\classes\Swift\Transport
\StreamBuffer.php on line 233

  Connection could not be established with host smtp.gmail.com [Unable
to find the socket transport ssl - did you forget to enable it when
you configured PHP? #274232]

my factories.yml is set correctly for sure, because when i am sending
emails not from tasks, IT WORKS. just not through task.
      transport:
        class: Swift_SmtpTransport
        param:
          host: smtp.gmail.com
          port: 465
          encryption: ssl
          username: x...@gmail.com
          password: 

i have also looked on my phpinfo() function and there i have already
allowed SSL:
Registered Stream Socket Transports     tcp, udp, ssl, sslv3, sslv2, tls

do you know where is the problem?
thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Question: The best way to embed javascript : in parial or in js files

2010-11-05 Thread Massimiliano Arione
On 4 Nov, 09:47, JoJo jojoyangd...@gmail.com wrote:
 As Gareth said, my concern is how to embed javascript function from partials
 between *head/head* tag.

You're wrong from the start: javascript tag can be put anywhere in the
html, and best place is in the bottom, just before body ends.
So, you can simply call use_javascript() in your partials, it just
works.

cheers
Massimiliano

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [Symfony 2] General Questions

2010-11-05 Thread Gustavo Adrian
Hi,

I'll use Symfony 2 for my next project in my job. I was testing the sandbox
at home and the latest version at git too. What I would like is, obviusly,
use the latest version because it has a lot of changes, in comparison with
PR3, in terms of syntax, etc. This is a project that will be product, not a
project of one month only. So I think it's better to use the latest version
of Symfony. I don't mind to keep updating my code with the latest changes.
But I would like to know how much out dated are the docs in comparison with
the latest version of Symfony at git

Also, is there a plan to release a new sandbox updated soon? If that's the
case maybe I can wait a little longer and use that version instead.


In any case, thanks in advance for reading this :)

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] [Symfony 2] General Questions

2010-11-05 Thread Alex Pilon
Any particular reason you need to use Symfony2? Its still in beta and isnt
planned to be fully released until March...

On Fri, Nov 5, 2010 at 10:46, Gustavo Adrian comfortablynum...@gmail.comwrote:

 Hi,

 I'll use Symfony 2 for my next project in my job. I was testing the sandbox
 at home and the latest version at git too. What I would like is, obviusly,
 use the latest version because it has a lot of changes, in comparison with
 PR3, in terms of syntax, etc. This is a project that will be product, not a
 project of one month only. So I think it's better to use the latest version
 of Symfony. I don't mind to keep updating my code with the latest changes.
 But I would like to know how much out dated are the docs in comparison with
 the latest version of Symfony at git

 Also, is there a plan to release a new sandbox updated soon? If that's the
 case maybe I can wait a little longer and use that version instead.


 In any case, thanks in advance for reading this :)

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Alex Pilon
(613) 608-1480

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] [Symfony 2] General Questions

2010-11-05 Thread Gustavo Adrian
Yes. I'm going to start two big projects at work that are going to be
products, not just one time apps. So I want to use the latest version of
Symfony because I plan to work in these apps the whole 2011 (and, with good
luck, the next years too) and I want to use the latest tools I have at hand,
but I need to start now and release some modules on the next two months. I
think it's better to use the latest version now and keep updating the code
than use v1.4 and then migrate the app to v2.0. Also, after seeing v2.0, I
don't want to look back :)

If your question was about why Symfony 2, I like a lot the new architecture
of the framework. It's features really worth a try. Also I would like to
contribute to the framework with some bundles I'll have to develop on the
way.

And another good reason: I love to try new things.. and this is, I think, a
good moment to renew some tools of my development environment.



I hope you understand my point. My english is really ugly, I apologize for
that :)


On Fri, Nov 5, 2010 at 11:54 AM, Alex Pilon alex.pi...@gmail.com wrote:

 Any particular reason you need to use Symfony2? Its still in beta and isnt
 planned to be fully released until March...

 On Fri, Nov 5, 2010 at 10:46, Gustavo Adrian 
 comfortablynum...@gmail.comwrote:

 Hi,

 I'll use Symfony 2 for my next project in my job. I was testing the
 sandbox at home and the latest version at git too. What I would like is,
 obviusly, use the latest version because it has a lot of changes, in
 comparison with PR3, in terms of syntax, etc. This is a project that will be
 product, not a project of one month only. So I think it's better to use the
 latest version of Symfony. I don't mind to keep updating my code with the
 latest changes. But I would like to know how much out dated are the docs in
 comparison with the latest version of Symfony at git

 Also, is there a plan to release a new sandbox updated soon? If that's the
 case maybe I can wait a little longer and use that version instead.


 In any case, thanks in advance for reading this :)

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




 --
 Alex Pilon
 (613) 608-1480

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] [Symfony 2] General Questions

2010-11-05 Thread Richard D Shank
I would just suggest that you keep an eye on 
https://github.com/fabpot/symfony and use that to keep things updated.  
I would say update as often as possible.  I have found its easier to 
make incremental changes,plus, you get the added benefit of learning 
more about the internals of Symfony2.  If you aren't aware, 
http://symfony2bundles.org/ is the place to find bundles.  Right now, 
this is a great place to see pieces of code that are actually on live sites.


Another suggestion is to join up with the 
https://github.com/symfony-cmf/symfony-cmf There is plenty to do for the 
project and I'm betting you can find something that overlaps your 
project.  Many of the people involved are also making production sites.  
Its a safe way to learn SF2 since you have people reviewing your code.


Have fun and just keep in mind you are aiming for a moving target.  It 
will be a bit challenging at times, but, personally, I think it has been 
worth it.


Richard

On 11/05/2010 08:17 AM, Gustavo Adrian wrote:
Yes. I'm going to start two big projects at work that are going to be 
products, not just one time apps. So I want to use the latest version 
of Symfony because I plan to work in these apps the whole 2011 (and, 
with good luck, the next years too) and I want to use the latest tools 
I have at hand, but I need to start now and release some modules on 
the next two months. I think it's better to use the latest version now 
and keep updating the code than use v1.4 and then migrate the app to 
v2.0. Also, after seeing v2.0, I don't want to look back :)


If your question was about why Symfony 2, I like a lot the new 
architecture of the framework. It's features really worth a try. Also 
I would like to contribute to the framework with some bundles I'll 
have to develop on the way.


And another good reason: I love to try new things.. and this is, I 
think, a good moment to renew some tools of my development environment.




I hope you understand my point. My english is really ugly, I apologize 
for that :)



On Fri, Nov 5, 2010 at 11:54 AM, Alex Pilon alex.pi...@gmail.com 
mailto:alex.pi...@gmail.com wrote:


Any particular reason you need to use Symfony2? Its still in beta
and isnt planned to be fully released until March...

On Fri, Nov 5, 2010 at 10:46, Gustavo Adrian
comfortablynum...@gmail.com mailto:comfortablynum...@gmail.com
wrote:

Hi,

I'll use Symfony 2 for my next project in my job. I was
testing the sandbox at home and the latest version at git too.
What I would like is, obviusly, use the latest version because
it has a lot of changes, in comparison with PR3, in terms of
syntax, etc. This is a project that will be product, not a
project of one month only. So I think it's better to use the
latest version of Symfony. I don't mind to keep updating my
code with the latest changes. But I would like to know how
much out dated are the docs in comparison with the latest
version of Symfony at git

Also, is there a plan to release a new sandbox updated soon?
If that's the case maybe I can wait a little longer and use
that version instead.


In any case, thanks in advance for reading this :)
-- 
If you want to report a vulnerability issue on symfony, please

send it to security at symfony-project.com
http://symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to
symfony-users@googlegroups.com
mailto:symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en




-- 
Alex Pilon

(613) 608-1480
-- 
If you want to report a vulnerability issue on symfony, please

send it to security at symfony-project.com
http://symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to
symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


--
If you want to report a vulnerability issue on symfony, please send it 
to security at symfony-project.com


You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com

Re: [symfony-users] [Symfony 2] General Questions

2010-11-05 Thread Fabien Potencier

Documentation for the master is here:

http://docs.symfony-reloaded.org/master/

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 11/5/10 3:46 PM, Gustavo Adrian wrote:

Hi,

I'll use Symfony 2 for my next project in my job. I was testing the
sandbox at home and the latest version at git too. What I would like is,
obviusly, use the latest version because it has a lot of changes, in
comparison with PR3, in terms of syntax, etc. This is a project that
will be product, not a project of one month only. So I think it's better
to use the latest version of Symfony. I don't mind to keep updating my
code with the latest changes. But I would like to know how much out
dated are the docs in comparison with the latest version of Symfony at git

Also, is there a plan to release a new sandbox updated soon? If that's
the case maybe I can wait a little longer and use that version instead.


In any case, thanks in advance for reading this :)

--
If you want to report a vulnerability issue on symfony, please send it
to security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] [Symfony 2] General Questions

2010-11-05 Thread Gustavo Adrian
@Richard: Yes, i think I'll go that way. Using the latest git version and
keep updating, while keeping an eye on the dev list. As you say, I'll learn
a lot about Symfony's internals on the way. I agree that it will be a big
challenge, but I think that's how the greatest apps differ from the rest,
taking risks. Calculated!, but risks anyway (Yes, I'm too exigent with
myself :P). And also I wanted to try something new and these is a great
opportunity to do so. Thanks for the links! I knew symfony2bundles but
didn't hear about the other. I'll take a look at it.

@Fabien: Thanks for the link! I've just started to read it to see the
differences between master and the PR3 I've used to develop a small test
project some days ago.




On Fri, Nov 5, 2010 at 1:43 PM, Fabien Potencier 
fabien.potenc...@symfony-project.com wrote:

 Documentation for the master is here:

 http://docs.symfony-reloaded.org/master/

 Fabien

 --
 Fabien Potencier
 Sensio CEO - symfony lead developer
 sensiolabs.com | symfony-project.org | fabien.potencier.org
 Tél: +33 1 40 99 80 80


 On 11/5/10 3:46 PM, Gustavo Adrian wrote:

 Hi,

 I'll use Symfony 2 for my next project in my job. I was testing the
 sandbox at home and the latest version at git too. What I would like is,
 obviusly, use the latest version because it has a lot of changes, in
 comparison with PR3, in terms of syntax, etc. This is a project that
 will be product, not a project of one month only. So I think it's better
 to use the latest version of Symfony. I don't mind to keep updating my
 code with the latest changes. But I would like to know how much out
 dated are the docs in comparison with the latest version of Symfony at git

 Also, is there a plan to release a new sandbox updated soon? If that's
 the case maybe I can wait a little longer and use that version instead.


 In any case, thanks in advance for reading this :)

 --

 If you want to report a vulnerability issue on symfony, please send it
 to security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Symfony2 support multi apps

2010-11-05 Thread Michael
How can i set a Symfony2 application to support multi application
(subdomains). is there a way in the rounding I can difference between
each one. for example:

set the NewsBundle \ to point NewsBundle:Default:index, and
AboutBundle \ to point to AboutBundle:Default:index

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Is this a normal behavior ? 45.54% doing gettimeofday

2010-11-05 Thread Alexandre Salomé
Sure, this is not a normal behavior.

This is not the first time that this test was made, already discussed on
newsgroup. but nobody never find the reason why.

Personaly, I think that framework is covered enough, and such bottleneck
would be identified. I think that test environment is the reason or cstat
misunderstood.

Don't know cstat enough, maybe you could investigate this for us ;)

Le 5 nov. 2010 12:11, Elvis apostolel...@gmail.com a écrit :

xdebug was not enabled, and no other debug modules loaded.
The first test was using a production server with nginx with phpfast-
cgi, and the percent of the gettimeofday call was similar. The one
below was on a server with apache.

On Nov 3, 12:47 am, Alexandre Salomé alexandre.sal...@gmail.com
wrote:

 Isn't it because of debug modules (XDebug, ...) ?
 Try optimisation of benchmark environment, to ...
 Le 2 nov. 2010 22:50, Elvis apostolel...@gmail.com a écrit :


 After doing some concurrency tests on a project, I've checked what
 does the php calls with str...
 symfony sandbox and made this call ab -n 100 -c 1http://test1.domain.ltd/

 ( 100 requests with 1 concurrent request, so nothing fancy)

 and got these results :

 % time...
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
symfony-users%2bunsubscr...@goog legroups.com
 For more options, visit this group athttp://
groups.google.com/group/symfony-users?hl=en

--

If you want to report a vulnerability issue on symfony, please send it to
security at symfony-projec...

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] More DQL query help

2010-11-05 Thread xpanshun
Hi everyone,


I am trying to return any record from the database where a certain
word (stored in variable $searchterm) is used (within a few different
fields)...

Here is what I have:

$q = Doctrine_Query::create()
-from('Product p')
-where('p.product_id = ?', $search_term)
-orWhere('p.product_full_desc LIKE ?', $search_term)
-orWhere('p.product_partial_desc LIKE ?', $search_term)
-orWhere('p.product_type = ?', $search_term);

$result_array_searchresults = $q-fetchArray();


However the only field that I can get a return from is a one-word
field like 'bracelet'. Fields like 'product_full_desc' or
'product_partial_desc' that contain strings/sentences won't return
anything. I want the query to be able to read through these strings
and pick out the search term.

What is wrong with my query? How can I achieve the result I want?


Thanks!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] More DQL query help

2010-11-05 Thread Alex Pilon
You need to use wildcards

On Nov 5, 2010 5:55 PM, xpanshun srhen...@gmail.com wrote:

Hi everyone,


I am trying to return any record from the database where a certain
word (stored in variable $searchterm) is used (within a few different
fields)...

Here is what I have:

$q = Doctrine_Query::create()
-from('Product p')
-where('p.product_id = ?', $search_term)
-orWhere('p.product_full_desc LIKE ?', $search_term)
-orWhere('p.product_partial_desc LIKE ?', $search_term)
-orWhere('p.product_type = ?', $search_term);

$result_array_searchresults = $q-fetchArray();


However the only field that I can get a return from is a one-word
field like 'bracelet'. Fields like 'product_full_desc' or
'product_partial_desc' that contain strings/sentences won't return
anything. I want the query to be able to read through these strings
and pick out the search term.

What is wrong with my query? How can I achieve the result I want?


Thanks!

--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: More DQL query help

2010-11-05 Thread xpanshun
Isn't that for when you want to go through all of the columns in the
database? I only wanted to look through the particular ones above...

On Nov 5, 6:01 pm, Alex Pilon alex.pi...@gmail.com wrote:
 You need to use wildcards

 On Nov 5, 2010 5:55 PM, xpanshun srhen...@gmail.com wrote:

 Hi everyone,

 I am trying to return any record from the database where a certain
 word (stored in variable $searchterm) is used (within a few different
 fields)...

 Here is what I have:

 $q = Doctrine_Query::create()
 -from('Product p')
 -where('p.product_id = ?', $search_term)
 -orWhere('p.product_full_desc LIKE ?', $search_term)
 -orWhere('p.product_partial_desc LIKE ?', $search_term)
 -orWhere('p.product_type = ?', $search_term);

 $result_array_searchresults = $q-fetchArray();

 However the only field that I can get a return from is a one-word
 field like 'bracelet'. Fields like 'product_full_desc' or
 'product_partial_desc' that contain strings/sentences won't return
 anything. I want the query to be able to read through these strings
 and pick out the search term.

 What is wrong with my query? How can I achieve the result I want?

 Thanks!

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@goog 
 legroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: More DQL query help

2010-11-05 Thread Alex Pilon
I mean for the LIKE clause.. so what happens is if you do t.column LIKE
'%$searchTerm%'; this will check for the search term within the content of
the column.

The dql rules are the same as the sql rules if you want to check that out on
mysql.com

On Fri, Nov 5, 2010 at 18:31, xpanshun srhen...@gmail.com wrote:

 Isn't that for when you want to go through all of the columns in the
 database? I only wanted to look through the particular ones above...

 On Nov 5, 6:01 pm, Alex Pilon alex.pi...@gmail.com wrote:
  You need to use wildcards
 
  On Nov 5, 2010 5:55 PM, xpanshun srhen...@gmail.com wrote:
 
  Hi everyone,
 
  I am trying to return any record from the database where a certain
  word (stored in variable $searchterm) is used (within a few different
  fields)...
 
  Here is what I have:
 
  $q = Doctrine_Query::create()
  -from('Product p')
  -where('p.product_id = ?', $search_term)
  -orWhere('p.product_full_desc LIKE ?', $search_term)
  -orWhere('p.product_partial_desc LIKE ?', $search_term)
  -orWhere('p.product_type = ?', $search_term);
 
  $result_array_searchresults = $q-fetchArray();
 
  However the only field that I can get a return from is a one-word
  field like 'bracelet'. Fields like 'product_full_desc' or
  'product_partial_desc' that contain strings/sentences won't return
  anything. I want the query to be able to read through these strings
  and pick out the search term.
 
  What is wrong with my query? How can I achieve the result I want?
 
  Thanks!
 
  --
  If you want to report a vulnerability issue on symfony, please send it to
  security at symfony-project.com
 
  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 symfony-users%2bunsubscr...@goog legroups.com
  For more options, visit this group athttp://
 groups.google.com/group/symfony-users?hl=en

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Alex Pilon
(613) 608-1480

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: More DQL query help

2010-11-05 Thread xpanshun
I tried it like this,

$q = Doctrine_Query::create()
-from('Product p')
-where('p.product_id = ?', $search_term)
-orWhere('p.product_full_desc LIKE ?', '%$search_term%')
-orWhere('p.product_partial_desc LIKE ?', '%$search_term%')
-orWhere('p.product_type = ?', $search_term);

But it still didn't work...is my syntax incorrect?


On Nov 5, 6:33 pm, Alex Pilon alex.pi...@gmail.com wrote:
 I mean for the LIKE clause.. so what happens is if you do t.column LIKE
 '%$searchTerm%'; this will check for the search term within the content of
 the column.

 The dql rules are the same as the sql rules if you want to check that out on
 mysql.com









 On Fri, Nov 5, 2010 at 18:31, xpanshun srhen...@gmail.com wrote:
  Isn't that for when you want to go through all of the columns in the
  database? I only wanted to look through the particular ones above...

  On Nov 5, 6:01 pm, Alex Pilon alex.pi...@gmail.com wrote:
   You need to use wildcards

   On Nov 5, 2010 5:55 PM, xpanshun srhen...@gmail.com wrote:

   Hi everyone,

   I am trying to return any record from the database where a certain
   word (stored in variable $searchterm) is used (within a few different
   fields)...

   Here is what I have:

   $q = Doctrine_Query::create()
   -from('Product p')
   -where('p.product_id = ?', $search_term)
   -orWhere('p.product_full_desc LIKE ?', $search_term)
   -orWhere('p.product_partial_desc LIKE ?', $search_term)
   -orWhere('p.product_type = ?', $search_term);

   $result_array_searchresults = $q-fetchArray();

   However the only field that I can get a return from is a one-word
   field like 'bracelet'. Fields like 'product_full_desc' or
   'product_partial_desc' that contain strings/sentences won't return
   anything. I want the query to be able to read through these strings
   and pick out the search term.

   What is wrong with my query? How can I achieve the result I want?

   Thanks!

   --
   If you want to report a vulnerability issue on symfony, please send it to
   security at symfony-project.com

   You received this message because you are subscribed to the Google
   Groups symfony users group.
   To post to this group, send email to symfony-users@googlegroups.com
   To unsubscribe from this group, send email to
   symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@goog
legroups.com
  symfony-users%2bunsubscr...@goog legroups.com
   For more options, visit this group athttp://
  groups.google.com/group/symfony-users?hl=en

  --
  If you want to report a vulnerability issue on symfony, please send it to
  security at symfony-project.com

  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@goog 
  legroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 Alex Pilon
 (613) 608-1480

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: More DQL query help

2010-11-05 Thread Alex Pilon
You still need the like..
$q-andWhere(c.col like ?, %$search%);

The percents are wildcards and will match other characters on either side of
the search term.

On Nov 5, 2010 6:50 PM, xpanshun srhen...@gmail.com wrote:

I tried it like this,


$q = Doctrine_Query::create()
-from('Product p')
-where('p.product_id = ?', $search_term)
-orWhe...
But it still didn't work...is my syntax incorrect?



On Nov 5, 6:33 pm, Alex Pilon alex.pi...@gmail.com wrote:
 I mean for the LIKE clause.. so what...

 On Fri, Nov 5, 2010 at 18:31, xpanshun srhen...@gmail.com wrote:
  Isn't that for when you wan...
--

If you want to report a vulnerability issue on symfony, please send it to
security at symfony-projec...

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: More DQL query help

2010-11-05 Thread xpanshun
IT WORKED!!! You are so awesome! :) I was putting single quotes around
the searchterm part instead of double quotes...Thank you!! :D

On Nov 5, 7:00 pm, Alex Pilon alex.pi...@gmail.com wrote:
 You still need the like..
 $q-andWhere(c.col like ?, %$search%);

 The percents are wildcards and will match other characters on either side of
 the search term.

 On Nov 5, 2010 6:50 PM, xpanshun srhen...@gmail.com wrote:

 I tried it like this,

 $q = Doctrine_Query::create()
 -from('Product p')
 -where('p.product_id = ?', $search_term)
 -orWhe...
 But it still didn't work...is my syntax incorrect?

 On Nov 5, 6:33 pm, Alex Pilon alex.pi...@gmail.com wrote:

  I mean for the LIKE clause.. so what...
  On Fri, Nov 5, 2010 at 18:31, xpanshun srhen...@gmail.com wrote:
   Isn't that for when you wan...

 --

 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-projec...

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: More DQL query help

2010-11-05 Thread Alex Pilon
Word, glad I could help.

On Nov 5, 2010 7:18 PM, xpanshun srhen...@gmail.com wrote:

IT WORKED!!! You are so awesome! :) I was putting single quotes around
the searchterm part instead of double quotes...Thank you!! :D


On Nov 5, 7:00 pm, Alex Pilon alex.pi...@gmail.com wrote:
 You still need the like..
 $q-andWh...

 On Nov 5, 2010 6:50 PM, xpanshun srhen...@gmail.com wrote:

 I tried it like this,

 $q = ...

-- 
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-pr...

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Defining an object [alias]?

2010-11-05 Thread xpanshun
Okay this may be the dumbest inquiry ever but I can't find any
references to help me.


In regards to the foreach statement (?php foreach ($products as
$product): ?) used in some of the default templates...

Clearly this is a loop, but the part reading $products as $product,
what does that exactly mean? I am assuming that $product is an alias
for $products, but where is $products defined in the first place?


Also, my most important question...

What is another way to define $products as $product without using a
loop?


Thanks in advance.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en