Welcome Guest, Not a member yet? Register   Sign In
"message": "Uninitialized string offset: 0"
#9

(This post was last modified: 08-30-2020, 07:54 AM by jreklund.)

(08-30-2020, 03:43 AM)jreklund Wrote: Don't insert an empty string then. We can't help you with the lack of information on how you are doing stuff (code and database design).

PHP Code:
$pQuery $this->DB->prepare(function($db)
{
    
$sql "INSERT INTO articles (article_slug,article_url,article_title,
                article_abstract,article_authors,article_area,article_keywords,article_journal,
                article_volume,article_issue,article_page_no,article_indexing,
                article_published_date,article_created_by,
                article_created_ip,pdf_name,pdf_file,image_file,image_file_name)
                VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
;
    return (new 
Query($db))->setQuery($sql);
}); 

this is my prepared statement

PHP Code:
$pQuery->execute("slug","url","title","abstract","authors","areas",
"keywords","journalName","volume","issue","pageNumber","indexing",
"publishDate","creatingAuthor","ip","pdfTitle","pdfFileName","",""); 
the above execute give me error

PHP Code:
$pQuery->execute("slug","url","title","abstract","authors","areas",
"keywords","journalName","volume","issue","pageNumber","indexing",
"publishDate","creatingAuthor","ip","pdfTitle","pdfFileName","test","test"); 

but this one not giving error

if i insert any empty string then having error
Reply


Messages In This Thread
RE: "message": "Uninitialized string offset: 0" - by regimon - 08-30-2020, 07:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB