Jump to content

Why does asterisk appear after the MySQL statement in PHP script???


Recommended Posts

This was taken from a working model. Inside the heredoc (<<<) an asterisk appears at the end of each MySQL statement after the semicolon (lines 3 and 9). The actual working script contains several statements and it appears after each one, so it's unlikely it was unintentional. Does anyone know its function or purpose?

 

<?php
$sql_file=<<<SQL_FILE
DROP TABLE IF EXISTS `table_name`;*
CREATE TABLE IF NOT EXISTS `table_name` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(250) default NULL,
  `address` varchar(250) default NULL,
  PRIMARY KEY  (`id`)
);*
SQL_FILE;
?>

u are blind or what?

CREATE TABLE IF NOT EXISTS `table_name` (  `id` int(11) NOT NULL auto_increment,  `name` varchar(250) default NULL,  `address` varchar(250) default NULL,  PRIMARY KEY  (`id`));*

How does your response answer the OP's inquiry?

 

Does the code contain anything like:

$some_var = explode( '*', $sql_file );

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.