Skip to main content
0 votes
1 answer
89 views

How to code a conditional call of create function in SQL Server [duplicate]

I am writing a script, that updates the database of my application to the next version. As part of the latest version updgrade, i added a regex function as a CLR User Defined Function out of an ...
MaxH's user avatar
  • 77
0 votes
1 answer
67 views

Replacing create_function in validation loop

I have a validation loop in a class in an outdated but functional plugin that I need to keep (for now). It uses create_function twice. if( is_array($s) ) { $c = count($s); ...
Katherine's user avatar
  • 157
0 votes
1 answer
1k views

PHP Parse error: syntax error, unexpected token "{", expecting ";" while trying to replace create_function() [duplicate]

Could someone please help me check the syntax in the following code and why this is giving an error? I've tried updating one of my Wordpress files to use the new syntax for function: { $if = ...
Marléze Scheepers's user avatar
0 votes
0 answers
192 views

Creating a function that changes the data types of columns in PostgreSQL

UPDATED I've written the following function and it is created successfully. But when I go to call it, an error pops up. I'm just learning how to use functions in Postgres, and I am confused here. ...
Wryiker's user avatar
-1 votes
1 answer
85 views

Create_function deprecated [duplicate]

I have taken over the 'admin' of a Wordpress website without the benefit of any documentation and it is falling over when creating invoices with this error. Whilst I can do somethings to get it going, ...
wimorrison's user avatar
0 votes
0 answers
24 views

write a function to produce a plot in R [duplicate]

I am trying to write a function that builds a plot, but as a return I get an empty plot. Can you advice what can I be doing so wrong? Clearly something is wrong with aes portion, but cannot figure out ...
Annie's user avatar
  • 11
4 votes
2 answers
2k views

How to read the function body of a Postgres standard-SQL function?

In Postgres 14 a new kind of syntax was added to CREATE FUNCTION where the body of the function can be specified directly in SQL rather than being contained in a string. The string bodies of functions ...
nyctef's user avatar
  • 580
-7 votes
2 answers
86 views

Can someone help me resolve an sql syntax error on pgadmin while creating a function? [closed]

First Attempt - CREATE FUNCTION rental_quarter (rental_date TIMESTAMP) RETURNS VARCHAR(7) BEGIN IF MONTH(rental_date) BETWEEN 1 AND 3 THEN RETURN YEAR(rental_date)+ ”Q1”; ELSE IF MONTH(rental_date) ...
KB_Wonderland's user avatar
0 votes
1 answer
28 views

Using Formoid webform on this page www.franktribute.com/RequestForm/request-form.php and now there is a depreciated error message on the page

The form has recently stopped sending. Deprecated: Function create_function() is deprecated in /home/customer/www/franktribute.com/public_html/RequestForm/testform4_files/formoid1/handler.php on line ...
Steve's user avatar
  • 1
1 vote
2 answers
397 views

Replace create_function with empty $args for PHP 8

I'm having trouble rewriting this line of code that contains create_function() in preparation for updating to PHP 8+. The line of code to replace is: add_action('widgets_init', create_function('', '...
jeffimperial's user avatar
1 vote
3 answers
280 views

creating function, outside main() function, for random Number in specific range

I am trying to write a function for a random number in a range decided by the user. I call srand() in int main() with the function RandomNumber defined above. I know if do the randomnumber equation in ...
ajsmith5150's user avatar
-1 votes
3 answers
1k views

How can I create a function to find the average of a list?

I'm trying to create a functional for the average of a list that accepts three parameters: a mandatory list of numbers, an optional minimum value which defaults to zero, and an an optional maximum ...
tatertot007's user avatar
0 votes
1 answer
2k views

rpc function tell me to reload the schema cache

I am creating an rpc function to get the number of likes for each post for a user, so I have created a function that takes userId as an argument, which is the uuid of the user that is in the session. ...
Richi's user avatar
  • 582
0 votes
1 answer
111 views

How to insert an array of ids with create function in node

I Have defined this mongoose schema in node `const bookingSchema = new mongoose.Schema({ tour: [ { type: mongoose.Schema.ObjectId, ref: 'Tour', required: [true, 'Booking must ...
Alex Karamanis's user avatar
1 vote
1 answer
344 views

Migrate create_function() which is not supported since PHP 7.2

I have 'create_function() in my PHP code: function encode_code_in_comment( $source ) { $encoded = preg_replace_callback( '/\[(php|html|javascript|css|nginx|apache|terminal)\](.*?)\[\/\1\]/ims', ...
Roee Yossef's user avatar

15 30 50 per page
1
2 3 4 5
8