Monday, March 10, 2014

Highlight php mysqli syntax in notepad++


Most of web developer use notepad++ for coding.It's very easy to use, super fast and free code editor.
I'm also using notepad++.As you know php is not supporting myslq function and this extension is deprecated as of PHP 5.5.0, and is not recommended for writing new code as it will be removed in the future. Either the mysqli or PDO_MySQL extension should be used.
But mysqli is not highlighting in notepad++..Here is the solution for you
  1. open note pad select settings
  2. select style configurator
  3. in language select php
  4. in style select WORD
  5. in user-defined key words enter the keyword you want highlighted.
    make sure there is a space after false (first item.)
    Below is a list (It's the ones I use.)
  6. Save and close.
True false
mysqli_affected_rows
mysqli_autocommit
mysqli_change_user
mysqli_character_set_name
mysqli_close
mysqli_commit
mysqli_connect_errno
mysqli_connect_error
mysqli_connect
mysqli_data_seek
mysqli_debug
mysqli_dump_debug_info
mysqli_errno
mysqli_error_list
mysqli_error
mysqli_fetch_all
mysqli_fetch_array
mysqli_fetch_assoc
mysqli_fetch_field_direct
mysqli_fetch_field
mysqli_fetch_fields
mysqli_fetch_lengths
mysqli_fetch_object
mysqli_fetch_row
mysqli_field_count
mysqli_field_seek
mysqli_field_tell
mysqli_free_result
mysqli_get_charset
mysqli_get_client_info
mysqli_get_client_stats
mysqli_get_client_version
mysqli_get_connection_stats
mysqli_get_host_info
mysqli_get_proto_info
mysqli_get_server_info
mysqli_get_server_version
mysqli_info
mysqli_init
mysqli_insert_id
mysql_kill
mysqli_more_results
mysqli_multi_query
mysqli_next_result
mysqli_num_fields
mysqli_num_rows
mysqli_options
mysqli_ping
mysqli_prepare
mysqli_query
mysqli_real_connect
mysqli_real_escape_string
mysqli_real_query
mysqli_reap_async_query
mysqli_refresh
mysqli_rollback
mysqli_select_db
mysqli_set_charset
mysqli_set_local_infile_default
mysqli_set_local_infile_handler
mysqli_sqlstate
mysqli_ssl_set
mysqli_stat
mysqli_stmt_init
mysqli_store_result
mysqli_thread_id
mysqli_thread_safe
mysqli_use_result
mysqli_warning_count

This is  same way you can add new keyword or function which you want to highlight in your notepad++.

Thanks

No comments:

Post a Comment

Total Pageviews