{"id":3532,"date":"2014-03-27T07:54:52","date_gmt":"2014-03-27T07:54:52","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/27\/mysqlsymfony1doctrinerelated-issues-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:47:15","modified_gmt":"2022-08-30T15:47:15","slug":"mysqlsymfony1doctrinerelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/27\/mysqlsymfony1doctrinerelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"mysql,symfony1,doctrineRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0a09a6e6bedf36728ae51f32e95adc17?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDino<br \/>\nmysql sql select<br \/>\nsuppose the user inputmysite.com\/profile?identity=1 mysite.com\/profile?identity=dinodsja mysite.com\/profile?identity=1agetting the value$identity = $_GET[&#8216;identity&#8217;]; \/\/ identity can be user_id or user_nameand i have a simple select query:SELECT * FROM lb_users WHERE (user_id = &#8216;dinodsja&#8217; OR user_name = &#8216;dinodsja&#8217;) AND user_status = 1and it works fine. but the problem is:SELECT * FROM lb_users WHERE (user_id = &#8216;1a&#8217; OR user_name = &#8216;1a&#8217;) AND user_status = 1when I execute this query it also returns<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/17c7e095f01176774bc3bb6e2c8174bd?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJohn Gold<br \/>\nmysql null<br \/>\nWhat &#8220;Allow Null&#8221; means and does? Thanks!<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1a3521db0840c883d6ecb38d6d82ab08?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nNoah<br \/>\nmysql ruby-on-rails database sqlite<br \/>\nAfter much googling I have been wondering what the benefits\/differences are between mysql and sqlite3. I am primarily hoping for a speed bump when moving my development database to my production database, although I imagine this will primarily happen in my code. Does any know what the major differences are in performance? ARE there? Or would you be able to point me in the direction of some literature comparing the two?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/9wnOz.jpg?s=32&amp;g=1\" \/><br \/>\nmusical_coder<br \/>\nphp mysql database parsing login<br \/>\ni got a parsing error for a database that i want to either retrieve and\/or delete data\/input &#8211; this is the error message that i get &#8211; *Parse error: syntax error, unexpected &#8216;public&#8217; (T_PUBLIC) in C:\\xampp\\htdocs\\ooplr\\classes\\DB.php on line 66*here are the codes for the file that is giving me the error:&lt;?phpclass DB{ private static $_instance = null; private $_pdo, $_query, $_error = false, $_results, $_count =0;private static function __construct(){try {$this-&gt;_pdo = new PDO(&#8216;mysql:host=&#8217;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1055182f84974a5990d07097e94279ed?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nClive<br \/>\nphp mysql<br \/>\nIf $userid equals $row[&#8216;RequestRecipientID&#8217;] then the script will output all $row[&#8216;StatusType&#8217;] which equals &#8220;Accepted&#8221;. What I&#8217;m needing for this script to do is only output the $row[&#8216;StatusType&#8217;] which equals to the $userid. Any ideas?&lt;?php include(&#8220;enc.php&#8221;); mysqlcon(); $userid = $_SESSION[&#8216;userid&#8217;]; $results = mysql_query(&#8220;SELECT requests.RequestRecipientID, requests.StatusType, requests.AddedMessage, requests.FriendType, requests.RequestSentByID, requests.id, users.username, users.first<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ecf6f53ab40e6c3b2bfc1072c2373610?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2241559<br \/>\nmysql shell scripting<br \/>\nI&#8217;m trying to iterate through a delimited text file and insert those into a mysql DB table using a shell script. #!\/bin\/bash while IFS=&#8217;|&#8217; read val1 val2 val3 #cat testfile.txt | while read line do#val1=`echo $line | cut -d&#8217;|&#8217; -f1`#val2=`echo $line | cut -d&#8217;|&#8217; -f2`#val3=`echo $line | cut -d&#8217;|&#8217; -f3`echo $val1 $val2 $val3\/usr\/local\/mysql\/bin\/mysql &#8211;host=127.0.0.1 &#8211;user=root &#8211;password= test &lt;&lt; EOFinsert into addressTable(street,city,zip)values(&#8216;$val1&#8242;,&#8217;$val2&#8242;,&#8217;$val3&#8217;)EOF done &lt; testfile<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/35fc83b88da2a80886637f345f04d478?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nRiong Riong<br \/>\nphp mysql forms email<br \/>\nCheck my code, everytime I press submit it tells me&#8230;Parse error: syntax error, unexpected T_STRING in \/1111111111\/2222222222222222222\/33333333\/444444444444444444444444444 on line 21Its frustrating. I thought I had everthing right. Here&#8217;s my php file:&lt;?php$email = $_POST[&#8217;email&#8217;];if ($username == null ||$email == null ||$password == null ) { die(&#8220;You must fill out everything on the form!&#8221;); } else { \/\/continue&#8230;} $conn = mysql_connect(&#8220;$############&#8221;, &#8220;$############&#8221;,&#8221;$#############<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Ll87K.jpg?s=32&amp;g=1\" \/><br \/>\nIvelyne Jacout<br \/>\nphp mysql wordpress<br \/>\nOdd problem, let me try and explain it clearly. I wrote a WordPress plugin, and it&#8217;s been installed on dozens of servers without issue. A client tried to install it today, and they received the following error Parse error: syntax error, unexpected &#8216;}&#8217; in \/sitepathhere\/wp-content\/plugins\/myplugin\/insert.php on line 302 The function was outputting text via an echo rather than returning text. Fine, I changed it to return the text and all worked ok for that part. Then the admin panel and front end<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e73b8cd481d3808749e4db2c07dc3709?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nlyhong<br \/>\nmysql<br \/>\nI have two tables with related key. I want to choose the best way to delete row from tbl_one and tbl_two rows that have related key. I tried using DELETE JOIN to do this correctly, but I found another way that is very simple that I use two statements of delete. Could you tell me which is better? First method:DELETE tbl_one, tbl_two FROM tbl_one JOIN tbl_two ON tbl_one.id = tbl_two.tbl_one_id WHERE tbl_one.id = 1Second method:DELETE FROM tbl_one WHERE id =1; DELETE FROM tbl_two WHERE tbl_one_id<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9a59e93ba898175f2db21cd7d807d41b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nG-Nugget<br \/>\nmysql innodb percona<br \/>\nI just installed Percona 5.6 on my new CentOS 6.4 server. It&#8217;s a fast machine 32 core xenon, 72GB ram, 8x SAS RAID 10 setup. So far so good My old server is a bit less powerful, and was running MySQL 5.1 still. So this was quite an upgrade. But I&#8217;m having some issues with InnoDB, it is not using the indexes correctly on some tables it seems. Where on my old machine the same queries were running fine.Both servers have the same database. I did a mysqldump on the old machine and imported it onto th<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2de6405052a8f9b142bea7024e8fa57e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nHans Mayer<br \/>\nphp mysql symfony1 propel<br \/>\nI&#8217;ve got a problem:I have a schema.yml which contains a field with the type &#8220;time&#8221;:time_space: { type: time, required: true }For my initial data, I have a fixture file which contains a value for the field &#8220;time_space&#8221;:time_space: 24:00:00 # doesn&#8217;t workWhen I look into my propel.ini (which isn&#8217;t modified of me so far), I see the following setting:propel.defaultTimeFormat = H:i:sMy error message is following when I execute &#8216;symfony propel:data-load&#8217; in my CLI:Error parsing date\/time valu<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/aee3b44e5f0b4dfa0e2da672897b3751?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nj0k<br \/>\nphp symfony1<br \/>\nI have a symfony 1.4 application with some classes for connecting to a SOAP web service stored in apps\/appname\/lib. When I try to access the sfConfig class to get some variables I have set in app.yml, an error is thrown since the application doesn&#8217;t recognize sfConfig::get(&#8216;app_myvar&#8217;) as a method being called on a class.How do I make the sfConfig class available to the classes in my apps\/appname\/lib directory?This is the error I&#8217;m gettingParse error: syntax error, unexpected &#8216;(&#8216;, expecting &#8216;,&#8217;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/76ac94d4bcd0e163b40d5b0ad1bbedb7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTuK<br \/>\nphp validation symfony1<br \/>\nI have a form for changing passwords, it checks the password field for min_length and required. Then it compares the password field with the confirm field.If I post to this form with less than the minimum required characters (and the password and confirm box match), it throws errors for min length (which is expected) and for password mismatch (unexpected). Can anyone tell why?&lt;?phpclass ChangeMyPasswordForm extends sfForm {const PASSWORD_MIN_LENGTH_MSG = &#8220;&lt;li&gt;We could not update your pa<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a7e904a0b242c8e4194abff1724ee212?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nClement Herreman<br \/>\nphp symfony1 doctrine dql doctrine-collection<br \/>\nI&#8217;ve a method that returns a Doctrine_Collection, with a whereIn() clause :public function getByValues($values) {if (!is_array($values))throw new sfException(&#8216;Wrong parameter type. Excepted array.&#8217;);return Doctrine_Query::create()-&gt;from(&#8216;Anomaly a&#8217;)-&gt;whereIn(&#8216;a.value&#8217;, $values); }However, when $values is an empty array, this method return all the rows that are in the AnomalyTable. This isn&#8217;t an unexpected behavior, as documented in Doctrine documentation, and written here : Doctrine where<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1637d00c9bca2d8fcd7a5389f4f1c24e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nManu<br \/>\nsymfony1 http-status-code-404 http-status-code-500<br \/>\nI&#8217;ve created custom 404 error pages for my symfony application, but they don&#8217;t seem to work. In dev I see :This request has been forwarded to a 404 error page by the action &#8220;blabla&#8221;.But in prod, the page is just blank; I get a 500 error.In the logs, the error is :PHP Parse error: syntax error, unexpected T_PUBLIC in \/var\/www\/myproject\/apps\/myapp\/modules\/default\/actions\/actions.class.php on line 7default\/actions\/actions.class.php is the following :&lt;?php \/*** Error page for page not found (404<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e22c8db5644afdd82698691e08534386?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nquardas<br \/>\nforms symfony1<br \/>\nI&#8217;ve been creating with a ajax and doctrine chain-dropdown to select a category. I put them in component. It works like this:http:\/\/www.plus2net.com\/php_tutorial\/ajax_drop_down_list.phpIm trying to replace default category dropdown build on schema and related with current table. When in \/lib\/form\/doctrine\/TabbleForm.class.phpI remove a field with code:unset($this[&#8216;category&#8217;]);And in the tamplate which has a form body I paste a component code (with this dynamic ajax-based dropdown):include_compon<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5aba61bb4da54c969c3e8cd5c71da663?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAndreu Heineken<br \/>\njavascript jquery symfony1 jstree<br \/>\ni did a descendant tree for an entity in my app, using the libray jstree. I do what is usual to use it:show an &lt;ul&gt; &amp; &lt;li&gt; structure as usual then i apply the .jstree(&#8230;) function to the parent &lt;div&gt; of the structure.I&#8217;m sorry but i can&#8217;t provide you my source code because is dynamically generated from diferent parts of the app, but i can show a result example of the &lt;ul&gt;&amp;&lt;li&gt; structure:&lt;div id=&#8221;unidadtree&#8221;&gt; &lt;ul&gt;&lt;li id=182 &gt;&lt;a href=&#8221;-ce<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/7qHj7.jpg?s=32&amp;g=1\" \/><br \/>\nAnchovyLegend<br \/>\nsymfony2 frameworks symfony1 twig<br \/>\nFor pages with lots of text and html tags, I quickly get a parsing error from Twig due to unexpected special characters. Has anybody else ran into this problem?Unexpected character &#8220;!&#8221; in &#8230; at line 76I am trying to fix this problem by pasting the static information in a new page and then including it using include. My question is, where should I place a static HTML file so it can be included in a Twig file using {% include &#8216;content.html&#8217; %}? Currently the included file is in the FooBundle\/Reso<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a5b78b5f2541de4f2578836a2217e75e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nprongs<br \/>\nphp symfony1 symfony-1.4 admin-generator<br \/>\nmy security.yml: all:is_secure: truenew:credentials: [add_ticker_source] edit:credentials: [edit_ticker_source] delete: credentials: [delete_ticker_source] batchDelete: \/\/I don&#8217;t know whether it is correct. Should it be batch_delete?credentials: [delete_ticker_source] batch_delete: credentials: [delete_ticker_source]index: is_secure: falsein my generator.yml, I added list:batch_actions:_delete: {credentials: delete_ticker_source}then I commented last two lines and opened list view in my browser.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5aba61bb4da54c969c3e8cd5c71da663?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAndreu Heineken<br \/>\nphp sql join symfony1 symfony-1.4<br \/>\ni&#8217;m trying to do a complex query with Criteria in a Symfony project using Propel ORM.the query i want to make is, in human words:Select from the &#8216;interface&#8217; table the registers that: &#8211; 1 are associated with a process (with a link table) &#8211; 2 have a name similat to $name &#8211; 3 its destiny application&#8217;s name is $apd (application accecible by foreign key) &#8211; 4 its originapplication&#8217;s name is $apo (application accecible by foreign key)here the code i made, and not working:$c = new Criteria();$c-&gt;add<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/816f969b7331813049b512a5bdfbac5b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1987373<br \/>\nsql symfony2 doctrine doctrine2 dql<br \/>\nI have a Repository Class with a method to call a custom Query. When I try to call findAllWithRating() from inside a controller I got the following exception:[2\/2] QueryException: [Syntax Error] line 0, col 156: Error: Unexpected &#8216;NULL&#8217;If I try to call the query within phpmyadmin the query works great! Any Idea?&lt;?php namespace Anchorbrands\\Bundle\\MessageBundle\\Entity;use Doctrine\\ORM\\EntityRepository;class MessageRepository extends EntityRepository {public function findAllWithRating() {return<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b95339c4c4209cb72d4f246ee5480dd6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nk314<br \/>\nzend-framework doctrine<br \/>\nI got problem with Doctrine. I add this lines in my application.ini:includePaths.model = APPLICATION_PATH &#8220;\/models&#8221;autoloaderNamespaces[] = &#8220;Doctrine&#8221;doctrine.dns = &#8220;mysql:\/\/root@localhost\/translators&#8221; dectrine.data_fixtures_path = APPLICATION_PATH &#8220;\/doctrine\/data\/fixtures&#8221; doctrine.models_path = APPLICATION_PATH &#8220;\/models&#8221; doctrine.migrations_path = APPLICATION_PATH &#8220;\/doctrine\/migrations&#8221; doctrine.sql_path = APPLICATION_PATH &#8220;\/doctrine\/data\/sql&#8221; doctrine.yaml_schema_path = &#8220;APPLICATION_PATH &#8220;\/do<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/592987f474ee562a63b8391e2e2b3c18?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nborrible<br \/>\nphp doctrine<br \/>\nI am seeing an unexpected caching effect in Doctrine (1.2.4).I have a couple of related tables defined by the following YAML (several additional fields not used in the example removed). Just a simple 1-Many relationship from students to schools.School:tableName: tblschoolcolumns:sch_id:name: sch_id as idprimary: trueautoincrement: truetype: integer(4)sch_name:name: sch_name as nametype: string(50) Student:tableName: tblstudentcolumns:stu_id:name: stu_id as idprimary: trueautoincrement: truetype<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d0d5513ee45fa835a471c9312968f638?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nYorkshireDeveloper<br \/>\nphp doctrine2 doctrine doctrine-query<br \/>\nI am trying to do a simple query in doctrine but struggling. $query-&gt;select(array(&#8216;app_title&#8217; =&gt; &#8216;u.title&#8217;,&#8217;user_name&#8217; =&gt; &#8216;u.user_name&#8217;,&#8217;first_used&#8217; =&gt; &#8216;MIN(u.creation_time)&#8217;,&#8217;last_used&#8217; =&gt; &#8216;MAX(u.stop_time)&#8217;,&#8217;total_usage&#8217; =&gt; &#8216;SUM(u.stream_seconds)&#8217;, )) -&gt;from(self::USAGE_TABLE, &#8216;u&#8217;) -&gt;orderBy(&#8216;total_usage&#8217;, &#8216;DESC&#8217;);Obviously I get an error about the column name not being known because Doctrine is using it&#8217;s own aliases (sclr4). However, if I try and order by the actual v<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/28c2f0146b5e6453a9ecafec33e00232?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nXMen<br \/>\nphp doctrine dbal<br \/>\nI want to use Doctrine DBAL , I downloaded the DBAL folder from a site. and put the folder on my server . and then write this code in my file .use Doctrine\\Common\\ClassLoader;require &#8216;Doctrine\/Common\/ClassLoader.php&#8217;;$classLoader = new ClassLoader(&#8216;Doctrine&#8217;, &#8216;Doctrine&#8217;); $classLoader-&gt;register(); $config = new \\Doctrine\\DBAL\\Configuration(); \/\/.. $connectionParams = array(&#8216;dbname&#8217; =&gt; &#8216;mydb&#8217;,&#8217;user&#8217; =&gt; &#8216;user &#8216;,&#8217;password&#8217; =&gt; &#8216;password&#8217;,&#8217;host&#8217; =&gt; &#8216;host&#8217;,&#8217;driver&#8217; =&gt; &#8216;pdo_mysql&#8217;, );<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/aee3b44e5f0b4dfa0e2da672897b3751?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nj0k<br \/>\nsymfony2 doctrine doctrine2 dql<br \/>\nI am developing an application using Symfony2 and DQL for building some queries in the repositories. I have the next code in the controller:$emGalPak = $this-&gt;getDoctrine()-&gt;getEntityManager();$OsatugabeKop = $emGalPak-&gt;getRepository(&#8216;AnotatzaileaAnotatzaileaBundle:GalderaPaketea&#8217;)-&gt;getOsatugabeKop(); and this is the query I built in the repository corresponding to the entity mentioned above:&lt;?phpnamespace Anotatzailea\\AnotatzaileaBundle\\Repository;use Doctrine\\ORM\\EntityRepositor<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a7e904a0b242c8e4194abff1724ee212?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nClement Herreman<br \/>\nphp symfony1 doctrine dql doctrine-collection<br \/>\nI&#8217;ve a method that returns a Doctrine_Collection, with a whereIn() clause :public function getByValues($values) {if (!is_array($values))throw new sfException(&#8216;Wrong parameter type. Excepted array.&#8217;);return Doctrine_Query::create()-&gt;from(&#8216;Anomaly a&#8217;)-&gt;whereIn(&#8216;a.value&#8217;, $values); }However, when $values is an empty array, this method return all the rows that are in the AnomalyTable. This isn&#8217;t an unexpected behavior, as documented in Doctrine documentation, and written here : Doctrine where<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9c0638740f30456f7224f18f33ba034b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDavid Weinraub<br \/>\nphp orm doctrine yaml case<br \/>\nJust getting started with Doctrine ORM for PHP (v1.1.5) and ran into something unexpected.I am generating models from the db (MySQL 4) using:Doctrine::generateModelsFromDb($pathToModels);Then generating YAML from the models using:Doctrine::generateYamlFromModels($pathToSchema . &#8216;\/schema.yml&#8217;, $pathToModels);In the generated models, the column names (as defined in hasColumn()) use the same case for the fields as in the db. All good.But in the generated YAML, the column names are all lower-case, i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/hbAoU.jpg?s=32&amp;g=1\" \/><br \/>\nManolo Salsas<br \/>\nphp symfony2 doctrine<br \/>\nAccording to Symfony2 documentation, I can access to instances in database with the next code:public function showAction($id) { $producto = $this-&gt;getDoctrine() -&gt;getRepository(&#8216;AcmeGuardaBundle:Producto&#8217;) -&gt;find($id); $nombreCategoria = $producto-&gt;getCategoria()-&gt;getNombre(); \/\/ &#8230; }However, I try to do:$imagen = $this-&gt;getDoctrine()-&gt;getRepository(&#8216;MSDHomeBundle:Imagen&#8217;)-&gt;find($_SESSION[&#8216;id&#8217;]);and I get the next error in the browser:Parse error: syntax error, unexpecte<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/68617066082037d8041db7f20a72d09f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser944448<br \/>\njquery doctrine<br \/>\nNeed help with this one. I&#8217;m kind of confuse. For me everything seems fine but I&#8217;m still getting errorParse error: syntax error, unexpected &#8216;(&#8216;, expecting T_VARIABLE or &#8216;$&#8217;Here&#8217;s my codeecho &#8220;$(&#8216;.gro-ls&#8217;).click(function(){$(this).css({background:&#8217;red&#8217;})});&#8221;;Can someone please tell me what&#8217;s wrong with this one?ThanksEdited: All the answers worked. Thanks guys<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dino mysql sql select suppose the user inputmysite.com\/profile?identity=1 mysite.com\/profile?identity=dinodsja mysite.com\/profile?identity=1agetting the value$identity = $_GET[&#8216;identity&#8217;]; \/\/ identity can be user_id or user_nameand i have a simple select query:SELECT * FROM lb_users WHERE (user_id = &#8216;dinodsja&#8217; OR user_name = &#8216;dinodsja&#8217;) AND user_status = 1and it works fine. but the problem is:SELECT * FROM lb_users WHERE (user_id = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[],"class_list":["post-3532","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-zend-framework"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3532"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3532\/revisions"}],"predecessor-version":[{"id":8959,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3532\/revisions\/8959"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}