Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Changes for conversion of mysql to postgres

1) mysql_query - > pg_query.


2) mysql_error - > pg_last_error.
3) mysql_num_rows - > pg_num_rows.
4) mysql_fetch_array - > pg_fetch_array.
5) Only <? not allowed we have to write <?php to start
php code.
6) Query or tags should be completed in 1 line only for
example for 1 query there should be only 1 line
number in editor.
7) If there is <?php =$x?> then = symbol is not allowed
instead we have to write <?php echo $x;?>.
8) For any query if we pass variable which is blank and its
data type in database is integer , smallint etc then we
have to give condition that if that varible is not null then
only execute that query.
9) For concat function - if we have to concatinate
catgfarmer_desc & lcatgfarmer_desc in query then instead
of writing
concat(catgfarmer_desc,'( ',lcatgfarmer_desc,' )') we
have to write catgfarmer_desc||' ( '||lcatgfarmer_desc||' )
'.
10) In database if there is integer,smallint,date etc. data type
and constraint is not null then default value has to be given
as 0 or 0001-01-01.
11) In php.ini file - date.timezone =Asia/.. For date() function error
12) query;; - not working and query;- working
13) In all db files - if varibale is of type integer and like interger types then set that
varible value to 0.
14) Comment for csrf-magic.php , validsession.php file.
15) Instead of taking phpsession id by request, take it as a session varible.
16) Add <?php include '../menu/index_top.php'; ?> <div id="middle"> after body tag for
new designing.
17) In query ` this symbol not working replace it by blank.
18) BINARY in query not working remove BINARY word.;

You might also like