The code below is part of an rss feed parser using WordPress's simplepie fetch_feed()...
Code is:
if ($enclosure = $item->get_enclosure(0))
{
$image_thumb = $item->get_enclosure()->get_link().'screenshot.jpg';
$image = $item->get_enclosure()->get_link().'screenshot-full.jpg';
}
$link = esc_url( strip_tags( $item...
Hey... so I attempted to run the query below and it just won't do it. I've checked:
The number of fields in the form matches the number of fields in the table.
The number of session variables matches those numbers too.
That the actual query contains the data to be input with an echo.
That the table name is correct.
That queries work wi...
$sql='UPDATE Reg_Stud SET Result=$perc WHERE RegID="$_SESSION['id']"';
Whts wrong with this syntax
...
Hello
The following code keeps giving me this eroor
"Parse error: syntax error, unexpected T_VARIABLE in ..."
?
$query_string = 'this is a test... "this is in quotes" mmm..chicken burgers... yummm...';
preg_match_all("/\".*\"|[^\s]*/", $query_string, $matches);
echo "Matches:";
foreach($matches[0] as $token) {
...
Hi folks, I have a PHP class that creates a SQL query based on values entered from a form. I'm getting
Incorrect syntax near the keyword 'WHERE'. ) )
Here is my code. The problem is occurring around each of the WHERE clauses, (already dealing with SQL injections btw).
if($from != ''){
$from = date('Y-m-d H:i:s',strtoti...
The code i have is:
for key in keys:
cursor.execute("""
ALTER TABLE segment_table ADD %s VARCHAR(40)
""", key)
I get a error telling me my syntax is wrong. When I replace the %s with a actual string the syntax error goes away.
for key in keys:
cursor.execute("""
ALT...
i am trying to get player logic in place with those if statements
player 1 fires 1st -> player 2 2nd then start over again
(an user checks a box)then the unset removes the pieces from the board as they are hit
Parse error: syntax error, unexpected
'(', expecting ']' in on line 93
the problem is this line of code:
...
Hi!
Hibernate is generating invalid SQL for a particular criteria query. I can manually fix the query by adding single quotes to the value being used in the WHERE clause.
To fix it, I changed the query from:
where (role0_.ROLE_ID=2L )
to:
where (role0_.ROLE_ID=`2L` )
How to force hibernate to add single quotes (in mysql it is si...