MySQL Forums
Forum List  »  PHP

Re: Tool to Update .ibd files
Posted by: Peter Brawley
Date: July 04, 2019 02:31PM

> I am very new to the syntax of PHP.

Um, hadn't you said "I am familiar with using PHP and SQL to update my tables"?

Start the page with ...

ini_set( "display_errors", "1" );

... so it shows errors.

> $img = "file_get_contents( 'c:\TriCounty01.JPG' )"

Every such statement needs a terminating semicolon.

Backslash is an escape character in most computer languages (a reason Microsoft's use of it as a directory separator is excrescently dumb). In MySQL and PHP use forward slashes in paths, the runtimes will translate them appropriately.

Then you need something like ...

$sql = "update advert04b set graphic01 = '$img' where serialno = 1";
$res = mysqli_query( $conn, $qry ) or exit( mysqli_error($conn );
echo mysqli_affacted_rows( $conn ), " rows affected";

Options: ReplyQuote

Written By
Re: Tool to Update .ibd files
July 04, 2019 02:31PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.